Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]What is the difference between predict_proba, decision_function and predict function and how to choose #620

Open
danny95928 opened this issue Aug 8, 2023 · 1 comment

Comments

@danny95928
Copy link

in chapter 3, you use the predict_proba to get list of probabilities for each instance of each class and then to threshold the predicted decision score you have used the decision_function() rather than predict() i'm suck at programming would you please tell me what is the differences between these and how to choose the right one

@messierandromeda
Copy link

predict_proba gives the probabilities of the image belonging to each class, in comparison to predict, which predicts a single digit. The decision_function relates to the Support Vector Classification (SVC), and it shows us the side of the hyperplane (generated by the classifier) that a particular point is on, and also the distance to it.
An explanation of decision_function vs. predict: https://stackoverflow.com/questions/20113206/scikit-learn-svc-decision-function-and-predict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants