Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pybrain: 'SupervisedDataSet' object has no attribute '_convertToOneOfMany' error #251

Open
ghost opened this issue Dec 11, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 11, 2021

I'm working on speech recognition using raspberry pi while I was running the code of the build model using pybrain features I got the error:'SupervisedDataSet' object has no attribute '_convertToOneOfMany' ?
If anyone has any pointers to get me back on the right path and that would be very much appreciated.
`
def createRGBdataSet(inputSet, numOfSamples, numOfPoints):
alldata = ClassificationDataSet(numOfPoints, 1, nb_classes=3)
# Iter through all 3 groups and add the samples with appropriate class label
for i in range(0, 3numOfSamples):
input = inputSet[i]
if (i < numOfSamples):
alldata.addSample(input, [0])
elif (i >= numOfSamples and i < numOfSamples
2):
alldata.addSample(input, [1])
else:
alldata.addSample(input, [2])
return alldata

Split the dataset into 75% training and 25% test data.

def splitData(alldata):
tstdata, trndata = alldata.splitWithProportion( 0.25 )
trndata._convertToOneOfMany()
tstdata._convertToOneOfMany()
return trndata, tstdata
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants