I\'m testing out pybrain following the basic classification tutorial here and a different take on it with some more realistic data here. However I receive this error when applyi
So, I did the following without getting an error:
from pybrain.datasets import ClassificationDataSet
ds = ClassificationDataSet(4096, 1 , nb_classes=40)
for k in range(400):
ds.addSample(k,k%4)
print(type(ds))
#
tstdata, trndata = ds.splitWithProportion(0.25)
print(type(trndata))
#
print(type(tstdata))
#
trndata._convertToOneOfMany()
tstdata._convertToOneOfMany()
The only difference I see between my code and yours is your use of X. Perhaps you can confirm that my code works on your machine, and if so then we could look into what about X if confusing things?