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
6
votes
1 answer

PyBrain neuron manipulation

Is there a good way to add/remove a neuron and its associated connections into/from a fully connected PyBrain network? Say I start with: from pybrain.tools.shortcuts import buildNetwork net = buildNetwork(2,3,1) How would I go about making it a…
ubomb
  • 9,438
  • 2
  • 20
  • 26
6
votes
2 answers

PyBrain: When creating network from ground up how and where do you create a bias?

Following the PyBrain documentation, Building Networks with Modules and Connections, I'm building a neural network piecewise (in contrast to using the buildNetwork shortcut). I'm constructing a simple 3-layer (input, hidden, output) neural network.…
User
  • 62,498
  • 72
  • 186
  • 247
5
votes
1 answer

how to feed pybrain ffn with one entry (to already trained network)?

I need to train network and then feed it with test data one by one. Is there some example or doc including it? To achieve that I serialized trained network and I use it with every new incoming entry. The problem is, I got crash from…
user425720
  • 3,578
  • 1
  • 21
  • 23
5
votes
5 answers

No module named 'structure' when installing PyBrain even though it's in the folder

I installed PyBrain via PyCharm and when I try to compile I get the following error: Traceback (most recent call last): File "C:/Users/Marcus/PycharmProjects/ANN/ann.py", line 2, in from pybrain.tools.shortcuts import buildNetwork …
mnordber
  • 1,143
  • 2
  • 13
  • 18
5
votes
1 answer

Simple Regression Example pyBrain

I am trying to make the simpliest regression on pyBrain but somehow I'm failing. The Neural Network should learn the function Y=3*X from pybrain.supervised.trainers import BackpropTrainer from pybrain.datasets import SupervisedDataSet from…
João Abrantes
  • 4,772
  • 4
  • 35
  • 71
5
votes
0 answers

ImportError: cannot open shared object file: No such file or directory

I'm trying to use arac with PyBrain, and when I call net.convertToFastNetwork(), or when I try to import arac.pybrainbridge (import arac works fine), I get this error : Traceback (most recent call last): File "", line 1, in File…
Pafnouti
  • 161
  • 1
  • 1
  • 8
5
votes
0 answers

Pybrain: Training an ActionValueNetwork doesn't properly work

I am trying to train an ActionValueNetwork on a simple XOR function, but the results look like random. """ Reinforcement Learning to learn xor function """ # generic import import numpy as np import random # pybrain import from…
fast_cen
  • 1,297
  • 3
  • 11
  • 28
5
votes
2 answers

Can't run Pybrain tutorial

I'm trying to run one of these tutorials and this is what I get: $ python rl.py Traceback (most recent call last): File "rl.py", line 22, in from pybrain.rl.environments.mazes import Maze, MDPMazeTask File…
Tjorriemorrie
  • 16,818
  • 20
  • 89
  • 131
5
votes
1 answer

Pybrain Neural Network failing to train correctly

I've been working on creating a neural network using pybrain, and after training it with propagation for some reason it fails to train my network. Any data set I use with more than two classes in the out dimension will just pile all my observations…
dr.meow
  • 51
  • 3
5
votes
2 answers

Pybrain outputs same result for any input

I am trying to train a simple neural network with Pybrain. After training I want to confirm that the nn is working as intended, so I activate the same data that I used to train it with. However every activation outputs the same result. Am I…
user1000952
5
votes
1 answer

pybrain poor results

I am wondering if I am doing something wrong or if results are really that poor. Lets assume the simplest NN examples as shown in documentation: >>>net = buildNetwork(2, 3, 1, bias=True) >>> ds = SupervisedDataSet(2, 1) >>> ds.addSample((0, 0),…
kosta5
  • 1,129
  • 3
  • 14
  • 36
5
votes
1 answer

how to fit a function using PyBrain networks?

there is a function like: y = sin(x) I want to use PyBrain networks to fit the functions, here are what i did: when you run it you will get what i get, the data obtained is far from what it should be. from pybrain.datasets import…
Eric Shore
  • 51
  • 3
5
votes
2 answers

PyBrain: Loading data with numpy.loadtxt?

I have some working code which correctly loads data from a csv file into a PyBrain Dataset: def old_get_dataset(): reader = csv.reader(open('test.csv', 'rb')) header = reader.next() fields = dict(zip(header, range(len(header)))) …
User
  • 62,498
  • 72
  • 186
  • 247
4
votes
0 answers

Pybrain cross-validation method

I'm trying to use the cross-validator on my data, but I'm getting 0.0 success rate, which doesn't make sense. My data is comprised of samples with 5 continuous attributes and two possible classes: "y" and "n". My code: net =…
Uri
  • 25,622
  • 10
  • 45
  • 72
4
votes
1 answer

Pybrain Reinforcement Learning Example

As the question states I am looking for a good explanation/example for reinforcement learning in pybrain as the documentation on this confuses me no end, I can get it to work but I don't understand how to apply it to other things. Thanks Tom
T0m
  • 153
  • 2
  • 12
1 2
3
20 21