Reputation: 993
Just a quick question, if I want to classify objects into either 0 or 1 but I would like the model to return me a 'likeliness' probability for example if an object is 0.7, it means it has 0.7 chance of being in class 1, do I do a regression or stick to classifiers and use the predict_proba function?
How is regression and predict_proba function different?
Any help is greatly appreciated!
Thank you!
Upvotes: 1
Views: 3949
Reputation: 5437
Since you mention the predict_proba
function I'm assuming you are referring to the scikit-learn API.
To obtain class-membership probailities this is the right function. In the case of logistic regression, this function is somehow the natural output.
You should also check probability calibration
Upvotes: 4
Reputation: 1138
Generally, for a qualitative problem that is to classify between categories or class, we prefer classification.
for example: to identify if it is night or day.
For Quantitative problems, we prefer regression to solve the problems.
for example: to identify if its 0th class or 1st class.
But in a special case, when we have only two classes. Then, we can use both classification and regression to solve two-class problems as in your case.
Please note that, this explanation is on the behalf of two-class point of view or multi-class problems. Though regression is to deal with real quantitative problems rather than classes.
Probability has nothing to deal specifically with methods. Each method deduce a probability and on the basis of that, they predict the outcome.
It is better if you explain the reference to
predict_proba
from your question.
Hope it helps!
Upvotes: 4