pybrain

multi-label classification in python

邮差的信 提交于 2021-01-29 11:11:42
问题 I am beginning to use Pybrain which good neural networks algorithms. If anybody is familiar with it already, is the package capable of doing multi-label classification as well? Multi-label is different from multi-class classification because an instance can have more than one class as their output/target. 回答1: Your question is a bit vague. Yes I believe I've understood you correctly, and yes PyBrain is capable of doing such a task. Neural networks in Pybrain are capable (through supervised

PyBrain in Anaconda - ImportError: No module named 'structure'

时光总嘲笑我的痴心妄想 提交于 2020-01-24 10:26:25
问题 I'm looking for a way to use numpy, scipy and pybrain in python. If I try to install those I get the error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat). I have installed visual studio but it still doesn't work. I have tried setting up an environment with conda including numpy and scipy and then installing pybrain in it using pip but when I try to import it I get the error: import pybrain Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:

Training an LSTM neural network to forecast time series in pybrain, python

…衆ロ難τιáo~ 提交于 2020-01-02 23:15:35
问题 I have a neural network created using PyBrain and designed to forecast time series. I am using the sequential dataset function, and trying to use a sliding window of 5 previous values to predict the 6th. One of my problems is that I can't figure out how to create the required dataset by appending the 5 previous values to the inputs and the 6th as an output. I am also unsure of how exactly to forecast values in the series once the network is trained. Posting my code below: from pybrain

How to compile my python code in cython with external python libs like pybrain

瘦欲@ 提交于 2019-12-23 16:30:06
问题 I need more perfomance running my neural network, so I thinked that building it with cython will be good idea. I am building my code like this: from distutils.core import setup from Cython.Build import cythonize setup( ext_modules = cythonize("my_code.pyx") ) But will it build external python files that I use? Like pybrain, skimage and PIL in my case. If not, how to force cython to build them. 回答1: No, external python files will not be cythonized and compiled unless you specifically add them

Pybrain Text Classification: data and input

岁酱吖の 提交于 2019-12-23 02:31:38
问题 I have 3 sets of sentences (varying in word counts), but I don't know how to extract features from the text such that the input dimension will remain the same. For example, I've tried bag-of-words but, since the word-count variation causes input-dimension variation, I eventually get errors. I would much appreciate it if you could show me an approach to preparing the string data for the neural network. Thank you! (Python 2.7 in Windows 7) 回答1: How to format the input This is an extraction from

How to load training data in PyBrain?

痞子三分冷 提交于 2019-12-21 09:33:11
问题 I am trying to use PyBrain for some simple NN training. What I don't know how to do is to load the training data from a file. It is not explained in their website anywhere. I don't care about the format because I can build it now, but I need to do it in a file instead of adding row by row manually, because I will have several hundreds of rows. 回答1: Here is how I did it: ds = SupervisedDataSet(6,3) tf = open('mycsvfile.csv','r') for line in tf.readlines(): data = [float(x) for x in line.strip(

How to do supervised deepbelief training in PyBrain?

风格不统一 提交于 2019-12-20 10:23:51
问题 I have trouble getting the DeepBeliefTrainer to work on my data in PyBrain/Python. Since I can't find any examples other than unsupervised on how to use the deep learning in PyBrain, I hope that someone can give examples that would show a basic concept of usage. I have tried to initialize using: epochs = 100 layerDims = [768,100,100,1] net = buildNetwork(*layerDims) dataset = self.dataset trainer = DeepBeliefTrainer(net, dataset=dataSet) trainer.trainEpochs(epochs) I try to use a

Creating custom connectivity in PyBrain neural networks

房东的猫 提交于 2019-12-20 08:58:25
问题 I want to create an artificial neural network (in PyBrain) that follows the following layout: However, I cannot find the proper way to achieve this. The only option that I see in the documentation is the way to create fully connected layers, which is not what I want: I want some of my input nodes to be connected to the second hidden layer and not to the first one. 回答1: The solution is to use the connection type of your choice, but with slicing parameters: inSliceFrom , inSliceTo ,

PyBrain:How can I put specific weights in a neural network?

一个人想着一个人 提交于 2019-12-18 13:19:53
问题 I am trying to recreate a neural network based on given facts.It has 3 inputs,a hidden layer and an output.My problem is that the weights are also given,so I don't need to train. I was thinking maybe I could save the trainning of a similar in structure neural network and change the values accordingly.Do you think that will work?Any other ideas.Thanks. Neural Network Code: net = FeedForwardNetwork() inp = LinearLayer(3) h1 = SigmoidLayer(1) outp = LinearLayer(1) # add modules net

Matching Binary operators in Tuples to Dictionary Items

我的未来我决定 提交于 2019-12-13 02:47:16
问题 So, I'm working on a Pybrain-type project and I'm stuck on part of it. So far the program takes in a tuple and assigns a variable to it using 'one of them fancy vars()['string'] statements. Specifically, it takes in a tuple of numbers and assigns it to a ' layerx ' value, where x is the number of the layer (in order, layer 1, 2, 3, etc), such that the numbers are the dimensions of that layer. The part of the program I desperately and humbly come to you for help in is what should be the next