Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AI and Deep Learning by (50.2k points)

I've read about neural network a little while ago and I understand how an ANN (especially a multilayer perceptron that learns via backpropagation) can learn to classify an event as true or false.

I think there are two ways :

1) You get one output neuron. Its value is > 0.5 the events are likely true if its values are <=0.5 the event is likely to be false.

2) You get two output neurons if the value of the first is > than the value of the second event is likely true and vice versa.

In these cases, the ANN tells you if an event is likely true or likely false. It does not tell how likely it is.

Is there a way to convert this value to some odds or to directly get odds out of the ANN. I'd like to get an output like "The event has 84% probability to be true"

1 Answer

0 votes
by (119k points)

You have to use the logistic sigmoid activation function in the output layer when using ANN (Artificial Neural Network) for classification. Then, the output values can be interpreted as probabilities.

So, if you doing for 2-class classification, you train using 1-of-C encoding, where 2 ANN outputs will have training values as (1,0) and (0,1) for the classes respectively.

To get the probability of first-class in percent, just multiply the first ANN output by 100. To get the probability of another class, use the second output.

For multi-class classification, use the softmax activation function.

To learn Artificial Neural Networks and implementing them using TensorFlow, then check out this AI Course by Intellipaat. 

Browse Categories

...