Earlier quoted context omitted.
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.
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.
Logistic regression from scratch
61–65 of 65 posts
Re: Logistic regression from scratch
#62Earlier quoted context omitted.
Logistic regression can use both L1 and L2 regularization
And ols can too. That doesn't make it machine learning. This implementation doesn't involve any regularization.
Re: Logistic regression from scratch
#63Earlier quoted context omitted.
Is that what some people call the 'mansplain' method?
no. all explanations must make some assumption about what readers already know, or else every explanation would begin with teaching english. also, mansplaining generally refers to assuming people (women, usually) have less pre-existing knowledge than they actually do.
Re: Logistic regression from scratch
#64Earlier quoted context omitted.
I'm trying to have a conversation so I can figure it out. Pretty confident that being a classifier does not make it machine learning, econometrics has classifiers too. Econometric models also need data to train them, so I'm not sure your second point is helpful either. Unless you're claiming the difference is nothing but whether the model is used by an economist.
What is machine learning then?
More generally, I recommend Breiman's two cultures article for some insight into the similarities and differences.
If you need a really simple explanation, then machine learning is a tool for generating predictions, while statistics is a method for performing inference about causes.
Re: Logistic regression from scratch
#65Earlier quoted context omitted.
Well, then I am gonna say it's even better to think of linear and logistic regression as special case of M Estimators or GMM. Joke aside, the truth is that logistic regression can be understood based on several assumptions. Above we have the latent variable explanation. Then there is a Bayesian version. There's even a "random utlity" formulation, where one models explicitly choices of an agent with a probabilistic er…
The main benefit of the GLM formulation is the observation that your model implies a particular probability distribution for the target, whether you like it or not. And that your point predictions are in fact conditional means . In my opinion, this is an important aspect of modeling that is glossed over or omitted by a lot of introductory material.
The point about the probability distribution is reasonable, but I am not sure if it is taken seriously by everyone applying GLM either. And again, if it is not necessary to assume such a distribution, then I would prefer a semi parametric approach, such as in linear regression.