News for hackers. Stuff that matters.
Re:Logistic regression from scratch by curiousgal on Thursday June 25, 2020 @05:46PM (#23646136)
From a stats perspective the cutoff is included in the coefficients. If you use a design matrix (add a column of 1s to your variables) you get in a non matrix notation (beta_01 + beta_1 X_1 +...) So the threshold can be considered beta_0.

In the software, you can get classification models to output class probabilities instead of class labels. You can then use whatever threshold you like for to transform those probabilities to labels.

You may see it refered to as "discrimination threshold". Varying that threshold is how ROC curves are constructed.

Re:Logistic regression from scratch by cuchoi on Thursday June 25, 2020 @10:03PM (#23647976)
The threshold would be beta_0 on every case or only when you have subtracted the mean from your data?
Re:Logistic regression from scratch by vhhn on Friday June 26, 2020 @08:32AM (#23651239)
You don't want to demean your dependent (response) binary variable. So you almost always want to keep beta0 to control for any imbalance in your dependent var.
Re:Logistic regression from scratch by cuchoi on Friday June 26, 2020 @02:05PM (#23655024)
I meant demeaning the independent variables. My understanding is that the beta_0 will have the meaning the curiousgal attach it only if you demean your independent variables.
Re:Logistic regression from scratch by vhhn on Friday June 26, 2020 @02:32PM (#23655306)
I see. But I think after demeaning X, beta0 will just have a special meaning... log odds of the average case. Nothing more.