How can I get a probability from a binary classification? Can I treat a binary output like a continuous to calculate a probability?

Viewed 165

I have a binary classification task with classes 0 and 1, I am interested in the probability of an input to be in one class, I have tried with Probabilistic neural networks but i just get 0s and 1s. ¿does anyone know a algorithm to get both: The probability and the classification 1 or 0? Ps. I`m using python.

If I use a regression model with a Sigmoid function to keep the result between 0 and 1, Can I interpret the output as a probability?

Edit: I did not know back then but I was looking for calibration models ( Platt’s or isotonic)

1 Answers
Related