-1

the way I understand logistic regression, threshold = 0.5 basically produces a hyperplane to classify inputs which minimizes log loss (all of which is converted into a 0 to 1 range using sigmoid), so when we use a different threshold it basically shifts the line like a bias would, so why is prediction better when we use a model which is considered sub-optimal by log loss?

  • 2
    Log-loss works on predicted probabilities. If you first convert to 0-1 predictions, you will take the log of zero, which is undefined. Can you clarify your question? A simple example may be helpful. – Stephan Kolassa Mar 26 '24 at 15:42
  • According to me, please do correct if wrong When we minimize log-loss, we are finding weights for the line/hyperplane [w.x + b] the line is such that point above the line are classified into a group (mathematically w.x +b > 0 ) and below into another class (w.x + b < 0) when we throw this into the sigmoid [say f(x)]; for all values where w.x + b > 0 we get f(x) > 0.5 and for all values for which w.x +b < 0 we get f(x) <0.5 so 0.5 is the natural threshold for forming the line which is optimal according to log loss, is there any faults in log loss? why is optimal threshold sometimes not 0.5? – SRAVAN KOTTA Mar 26 '24 at 16:03
  • 1
    Logistic regression models class membership probabilities by maximizing the log-likelihood. The optimal decision (not classification!) threshold will depend on your costs: https://stats.stackexchange.com/q/312119/1352 – Stephan Kolassa Mar 26 '24 at 16:10

0 Answers0