Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Incubator Q&A

Welcome to the staging ground for new communities! Each proposal has a description in the "Descriptions" category and a body of questions and answers in "Incubator Q&A". You can ask questions (and get answers, we hope!) right away, and start new proposals.

Are you here to participate in a specific proposal? Click on the proposal tag (with the dark outline) to see only posts about that proposal and not all of the others that are in progress. Tags are at the bottom of each post.

Post History

66%
+2 −0
Incubator Q&A Why can't we use linear regression on logits for solving logistic regression problems?

Consider a machine learning problem with inputs $\boldsymbol{X} \in \mathbb{R}^{N \times D}$ and corresponding labels $\boldsymbol{y} \in \mathcal{Y}^N$. When the problem is to solve a regression ...

1 answer  ·  posted 1y ago by mr Tsjolder‭  ·  last activity 1y ago by mr Tsjolder‭

#1: Initial revision by user avatar mr Tsjolder‭ · 2023-08-06T10:53:22Z (over 1 year ago)
Why can't we use linear regression on logits for solving logistic regression problems?
Consider a machine learning problem with inputs $\boldsymbol{X} \in \mathbb{R}^{N \times D}$ and corresponding labels $\boldsymbol{y} \in \mathcal{Y}^N$.

When the problem is to solve a regression task, $\mathcal{Y}^N = \mathbb{R}^N$ and we can use linear regression model,
$$\hat{\boldsymbol{y}} = \boldsymbol{X} \boldsymbol{w},$$ 
which has a closed-form solution for the parameters of our model:
$$\boldsymbol{w} = \big(\boldsymbol{X}^\mathsf{T} \boldsymbol{X}\big)^{-1} \boldsymbol{X}^\mathsf{T} \boldsymbol{y}.$$

When the problem is a classification task, such that $\mathcal{Y}^N = \{0, 1\}^N,$ we would typically use a logistic regression model,
$$\hat{\boldsymbol{y}} = \mathop{\sigma}(\boldsymbol{X} \boldsymbol{w}),$$
where $\sigma(s) = \big(1 + \exp(-s)\big)^{-1}$ is the logistic sigmoid.
Unfortunately, there is no closed-form solution for logistic regression.
Typically, we have to use methods like gradient descent to find a solution.
However, since the logistic sigmoid is invertible, I would assume that we can also write the logistic regression model as
$$\ln\Bigl(\frac{\hat{\boldsymbol{y}}}{1 - \hat{\boldsymbol{y}}}\Bigr) = \boldsymbol{X} \boldsymbol{w}$$
to directly model the logits, $\ln\Bigl(\frac{y}{1 - y}\Bigr)$.
After all, this would allow us to use the analytical solution from linear regression to solve logistic regression problems.

Why is this approach not used anywhere? Is there a mistake in my reasoning or are there problems with this approach that I am not aware of?