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

I am having a problem with my code, please help! #250

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

I am having a problem with my code, please help! #250

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, 3*numOfSamples):
        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
@ghost ghost changed the title Pybrain: 'SupervisedDataSet' object has no attribute '_convertToOneOfMany' error I am having a problem with my code, please help! Dec 11, 2021
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