Questions tagged [pybrain]

PyBrain is an open source machine-learning library for python. It supports a wide range of optimisation techniques, neural networks, reinforcement learning and more.

PyBrain is a machine learning library that can be used by entry-level students but offers the flexibility and algorithms for state-of-the-art research.

For more information, see the PyBrain homepage

310 questions
3
votes
1 answer

Creating shared weight connections in Pybrain

I am trying to create a neural network in PyBrain which utilizes shared weight connections, but am having trouble doing so. I haven't found too many examples which use these type of connections, but had thought that I had gleaned the way to use them…
gammapoint
  • 1,083
  • 2
  • 15
  • 27
2
votes
1 answer

How to choose Xmax,min (range of weights) for a PSO-trained MLP Neural Network?

I'm training a MLP Neural Network using Particle Swarm Optimization for classification using datasets from UCI. I'm using PyBrain to construct NNs and my custom code to train the network. My question is, how do I choose the Xmax, Xmin parameter for…
sham
  • 33
  • 4
2
votes
2 answers

How do you make a prediction (forecast) from a trained network for a given input?

Below is my code for a neural network,with 3 inputs and 1 hidden layer and 1 output: #Data ds = SupervisedDataSet(3,1) myfile = open('my_file.csv','r') for data in tf.myfile (): indata = tuple(data[:3]) outdata = tuple(data[3]) …
IordanouGiannis
  • 4,149
  • 16
  • 65
  • 99
2
votes
1 answer

Neural Network Data Sparsity

I am using PyBrain to train a network on music. The input is two notes, and the output is the next two notes. Each note is represented by an integer mapped to a note (E.G C# = 11, F = 7), the octave, and the duration. So I was using a dataset as…
FatUglyProud
  • 137
  • 1
  • 12
2
votes
6 answers

Running neural network pybrain

I want to create neural network and install scipy and PyBrain for it. On file i write: from pybrain.tools.shortcuts import buildNetwork net=buildNetwork(4,2,1) and when i run that file, an error occured from scipy.linalq import inv,det, svd, logm,…
2
votes
1 answer

Making a correct ANN for forecasting

This is my first time using python, so I'm having lots of doubts. I'm trying to make a simple ANN for forecasting in Pybrain. It is a 2 input-1 output net. The inputs are, in the first column has the years and the second column has the months of the…
Jvr
  • 563
  • 1
  • 5
  • 15
2
votes
2 answers

Why can't PyBrain Learn Binary

I am attempting to get a network (PyBrain) to learn binary. This my code and it keeps return values around 8, but it should be return 9 when I activate with this target. from pybrain.tools.shortcuts import buildNetwork from pybrain.structure import…
Evan
  • 23
  • 1
  • 6
2
votes
1 answer

Python: multithreaded learning neural networks using PyBrain and Multiprocessing

I'm trying to train a neural network in Python using PyBrain and Python's multiprocessing package. Here is my code (it trains a simple neural network to learn the XOR logic). import pybrain.tools.shortcuts as pybrain_tools import…
agtoever
  • 1,669
  • 16
  • 22
2
votes
1 answer

How to save action table in pybrain

I want to use Pybrain Reinforcement Learning to build a AI to play a game. I use Reinforcement Learning, it will generate a action value table. But i don't know how to save it, and read after i train it. I have found how to save the network in…
2
votes
1 answer

Prediction data in PyBrain

I make a prediction on the basis of the available data. But they are wrong. And i don`t know why. I have code creating and training neural networks. ds = SupervisedDataSet(3, 1) ds.addSample( (76.7, 13.8, 103.0), (770,)) ds.addSample( (70.9, 13.0,…
2
votes
0 answers

Image Categorisation using Feed-Forward Network. Why do i get the same values?

I'm pretty new to all this business of machine learning and image categorisation. I'm using pybrain as my primary neural network modelisation tool. My problem is the following. I have 100x100 images that have 0,1,2,3 items and I would like the…
MastaJeet
  • 91
  • 6
2
votes
0 answers

Customising PyBrain code to run as a Spark job

I have a basic, working neural network implementation in PyBrain # relevant imports go here train_input = numpy.loadtxt('train_input.csv', delimiter=',') test_input = numpy.loadtxt('test_input.csv', delimiter=',') train_output =…
Philip O'Brien
  • 4,146
  • 10
  • 46
  • 96
2
votes
1 answer

PyBrains Q-Learning maze example. State values and the global policy

I am trying out the PyBrains maze example my setup is: envmatrix = [[...]] env = Maze(envmatrix, (1, 8)) task = MDPMazeTask(env) table = ActionValueTable(states_nr, actions_nr) table.initialize(0.) learner = Q() agent = LearningAgent(table,…
Boris Mocialov
  • 3,439
  • 2
  • 28
  • 55
2
votes
1 answer

PyBrain buildNetwork vs FeedForwardNetwork

for homework I'm suppose to create a multi layer perceptron artificial neural network that does classification. I'm new to PyBrain and I'm trying to create a feed forward neural network with back propagation and after googling around, it seems like…
itsSLO
  • 359
  • 1
  • 4
  • 10
2
votes
1 answer

PyBrain - out = fnn.activateOnDataset(griddata)

I have been adapting a neural network to classify images from PyBrain's tutorial: http://pybrain.org/docs/tutorial/fnn.html It is feed in image data in png form, each image is assigned a particular class. It works well until: out =…