How does the MultiLayerPerceptron Predictor node calculate the probability of each class?

image
hey guys,
i just clicked “Append columns with normalized class distribution” in MultiLayerPerceptron Predictor, and i noticed, that the output table is a bit …emmm…strange…
like this:


and this:

i added column “% sum” to calculate sum of probability for each instance.
I’m curious, why their sum is not equal to 1?
Is there any way to regularize them? into a normal probability distribution?

Thx!
Mex

Hi @ixdmei,

indeed, based on the setting naming in the configuration dialog one could assume probabilities sum up to 1. However, node description only mentions class probabilities. I’ll check what is the intended behavior here and create a ticket for node description and configuration dialog to be aligned.

If you need a probability distribution that sums up to 1 as output, you might just want to apply a softmax function. There might be better ways to do this, but here is an example using the Keras nodes: https://kni.me/w/fRXnIt2wxCH_O_oW

3 Likes

Thx! it’s a very good choice for the current situation!

1 Like

For completeness of record:
@nemad checked how it is implemented: The MultiLayerPerceptron uses the Sigmoid activation in the output layer which means that the probabilities are NOT normalized across classes. Instead, each output neuron calculates the probability of its class independent of the other output neurons.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.