2021-07-30

Get output from Scikit-learn Logistic Regression as probability vector, not int number

I've tried to learn how to transfer learning for classifying images. Specifically, I used a pre-trained model to extract features from raw images, then use Logistic Regression model in one-vs-rest mode (fig. below) from scikit-learn library to classify images. My problem is the output from Logistic Regression is always int numbers, which are encoded from raw labels. I don't know how to get the raw outputs, which is probability vector (something like [probability of 1, probability of not 1]) of each output node.

My question is: How can I get probability vectors like that?

Any help would be greatly appreciated, thank you!

One-vs-rest Logistic Regression diagram



from Recent Questions - Stack Overflow https://ift.tt/3zL3U55
https://ift.tt/eA8V8J

No comments:

Post a Comment