from pybrain.structure import FeedForwardNetwork
from pybrain.structure import LinearLayer, SigmoidLayer
from pybrain.structure import FullConnection
from pybrain.datasets import SupervisedDataSet
import numpy as np
X = np.loadtxt('xdatanorm.txt', dtype=float)
y = np.loadtxt('ydatanorm.txt', dtype=float)
n = FeedForwardNetwork()
inLayer = LinearLayer(35)
hiddenLayer = SigmoidLayer(18)
outLayer = LinearLayer(1)
n.addInputModule(inLayer)
n.addModule(hiddenLayer)
n.addOutputModule(outLayer)
in_to_hidden = FullConnection(inLayer, hiddenLayer)
hidden_to_out = FullConnection(hiddenLayer, outLayer)
n.addConnection(in_to_hidden)
n.addConnection(hidden_to_out)
n.sortModules()
DS = SupervisedDataSet(35,1)
DS.addSample(X,y)
Starting using pybrain to get a Neural Network to work on my diffusion energy data. I don't know how to get a dataset working from my X and y values. X is 35 inputs and y is 1 ouput and there are 148 samples. With this code I get the error: "ValueError: could not broadcast input array from shape (148,35) into shape (35)"
Need to know how to properly prepare a dataset for pybrain.