It outperforms most models in binary classification tasks.

also supports multi-class classification but it often runs into convergence issues and will usually not outperform more complex, and uninterpretable, models like Regression Trees, Neural Networks, etc.

Interpretability

Logistic regression is an interpretable model, unlike a random forest, which is more of a black-box method. the name regression comes from the RHS of the following equation, as you must assume a linear relationship , note that like any Regression, can be transformed to achieve polynomial regression

logit function

  • Recall that the logarithmic function is defined over the positive reals: . So , is only defined for such that which ends up being (easy to see graphically, need a full analysis of asymptotes and inflexions to prove rigorously).

Mathematical principle

The logit function has a range of and a domain of , meaning it maps probabilities from onto the real line. Its inverse function, known as the expit (or sigmoid) function, is perhaps more intuitive in the context of logistic regression: it maps numerical values from onto the probability range , ensuring the outputs represent valid probabilities.

To recover the succcess/label 1 probability, p, we use the expit function:

As you would expect, p is equal to a function that takes the linear model onto the range which is fit for a probability.

ODDS

log odds is exactly what it sounds.

A coefficient can be interpreted as a log odds ratio of a one unit differnce in the direction of its variable:

If

and

Then

[

\beta_1 = log(\frac{odds_j}{odds_i})

]

For interpretation:

Exponential coefficients give the log odds ratio of one unit increase in the x variate of the coeficient.

So if

you can say: “on average, each 1% increase in average \textbf{increases the odds} of admission by \textbf{a factor of} , with all other variables held constant.”

So if the odds () of admission for an average of are, say 7.38, then the revised odds for an average of are =

WE can only make statements about odds. We cannot say anything about how the probabilities themselves will change when you increase one variate by 1 because the increase is non-constant.

\subsubsection{model evaluation}

Logistic regression is less prone to overfitting than other learning methods.

\begin{itemize}

\item Linearity assumption makes the model highly inflexible.

\item There is no tunning parameter by default… you could regularize.

\item Usually no test/train/cv split for logistic regression needed.

\item it is hard to beat logistic regression (bi class) in terms of prediction.

\item it is easier to beat linear regression or multi-class logisti regression.

\item Affected a great deal with multicolinearity.

\item Only has \textbf{linear} decision boundaries

\end{itemize}