Amoroso
Amoroso

Reputation: 993

Regression vs Classifier predict_proba

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

Answers (2)

Quickbeam2k1
Quickbeam2k1

Reputation: 5437

Since you mention the predict_probafunction 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

abhinav
abhinav

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

Related Questions