Suppose that you have a logistic model and the predicted probabilities of a $1$ all are in $[0.2,0.3]$. So the predictions would be "0" based on a threshold of $0.5$. What would be a good threshold to choose?

  • 3
    $\begingroup$ Why would you need a treshold? $\endgroup$ – kjetil b halvorsen May 12 '18 at 15:50
  • $\begingroup$ So that I can get better predictions. Right now my model predicts all 0's. $\endgroup$ – user21478 May 12 '18 at 15:51
  • 7
    $\begingroup$ Logistic regression predicts probabilities. If these are sufficient to solve your problem, you dont need a treshold. So what are you using the regression for? $\endgroup$ – Matthew Drury May 12 '18 at 16:21
  • 4
    $\begingroup$ You will find much information here: stats.stackexchange.com/questions/127042/… $\endgroup$ – kjetil b halvorsen May 12 '18 at 16:33

If your logistic model has predicted probabilities that are always in $[0.2, 0.3]$ for class $1$ and you have sufficient inclusion of class $2$ data you have possibly trained it with appropriate data or used appropriate features. The logistic regression model is probabilistic; ie, it spits back probabilities. If you decide that the model saying class $1$ has probability of $0.25$ and class $2$ has probability $0.75$ I feel as though you've eliminated a lot of the strong points and highlights of a probabilistic model as now your inference on features is wonk and difficult to properly interpret (using standard tests, which is really the best argument in favor of probabilistic models over other strategies and their bread-and-butter use-case). You can hack together other models that will probably fit better if you don't want a probabilistic strategy (ie, RF, NNs, etc).


Plot the ROC curve predicting class based on the output p value, then decide visually or using an optimal threshold algorithm considering your sensitivity/specificity tolerance

  • $\begingroup$ choosing a threshold that isn't 0.5 completely voids the purpose of a probabilistic LR model; doing this you completely break the chain of assumptions that allow you to do things like the "standard" statistical tests, model GOF tests, etc. They are not valid when you select a threshold that is not in line with the model as a threshold is not a free parameter for logistic regression. $\endgroup$ – Eric Mar 10 '20 at 5:04
  • 1
    $\begingroup$ @Eric that’s just not correct. When you plot out your ROC you become privy to the family of decision criteria that can be made based on the data available. Depending on the context and objectives, it is warranted to choose a decision criterion favoring any combination of sensitivity or specificity. Could this prevent some statistical tests? ...Maybe? But it doesn’t matter. The purpose is to understand the trade-off and decide appropriately. I do not think this deserves a downvote. $\endgroup$ – HEITZ Mar 13 '20 at 7:17
  • $\begingroup$ A logistic regression model does not have a threshold parameter. Nowhere in a logistic regression model is there tuning for thresholds. Can you work around it, build in a threshold, and perhaps get awesome results? Sure. But it is no longer a logistic regression model with the normal interpretability. You can't look at odds, you can't look at odds ratios, etc in the parametric form. Finally, at the end when it comes time to interpret the model you have lost the interpretability of a coefficient, what a significant coefficient is defined as/means, etc. $\endgroup$ – Eric Mar 14 '20 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.