Suppose my training data contains ~100 variables, and each example is tagged as "success" or "failure".

I understand how a neural network can be used to try and predict success vs failure based on the variables.

However I am interested in the neural network outputting the posterior probability rather than success or failure. In fact, I evaluate the efficacy of the NN based on how accurate the probabilities are (eg. AUROC over the entire dataset) rather than % of cases with correct prediction.

Are NN's the right tool for the job here and if so how do you structure the NN to output this?

(NOTE: I'm a ML newbie!)

  • $\begingroup$ Some answers were given to this question in an earlier post $\endgroup$
    – G5W
    Jan 16, 2017 at 0:19

3 Answers 3


If your activation function is for example logistic, then it will output continuous value between 0-1, or you can use softmax in the case of multiple outcome variables.


Just for people who are still interested in this question:

Softmax of state-of-art deep learning models is more of a score than probability estimates.

Most deep networks nowadays are overconfident, check the follow paper if you are interested: https://arxiv.org/pdf/1706.04599.pdf


In your NN, if you use a softmax output layer, you'll actually end up with an output vector of probabilities. This is actually the most common output layer to use for multi-class classification problems. To fetch the class label, you can perform an argmax() on the output vector to retrieve the index of the max probability across all labels.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.