Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)
I am using the  LogisticRegression() method in scikit-learn on a highly unbalanced data set. I have even turned the class_weight feature to auto.

I know that in Logistic Regression it should be possible to know what is the threshold value for a particular pair of classes.

Is it possible to know what the threshold value is in each of the One-vs-All classes the LogisticRegression() method designs?

I did not find anything in the documentation page.

Does it by default apply the 0.5 value as threshold for all the classes regardless of the parameter values?

1 Answer

0 votes
by (33.1k points)
edited by

Logistic regression usually chooses the class that has the highest probability. Working on 2 classes, the threshold is 0.5: if P(Y=0) > 0.5 then obviously P(Y=0) > P(Y=1). The same stands for the multiclass setting, it chooses the class with the biggest probability

There are thresholds that only affect the proportion of false positives/false negatives, but it is not the parameter of the LR model.

Hope this answer helps you! Also, learn more about Machine Learning Algorithms through this.

Learn more about Logistic Regression by watching this video tutorial:

Browse Categories

...