Question

I follow the PyBrain tutorial Classification with Feed-Forward Neural Networks and want to build my own classifier.

I do not understand how _convertToOneOfMany modifies outputs.

Why would initial operation alldata.addSample(input, [klass]) create more than one output neuron per class?

Was it helpful?

Solution

nevermind, here is doc explaining this stuff http://pybrain.org/docs/tutorial/datasets.html

OTHER TIPS

Target number is [0,1,2], this function translate them to (001,010,100). This is because many algorithms work better if classes are encoded into one output unit per class

The relevant part in the docs is the page Using Datasets: classification – Datasets for Supervised Classification Training:

When doing classification, many algorithms work better if classes are encoded into one output unit per class, that takes on a certain value if the class is present. As an advanced feature, ClassificationDataSet does this conversion automatically:

However, this is not an satisfying answer as I don't understand either why there should be more than one output neuron per class in the first hand.

Update: I recommend using keras

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top