Link: Probability distribution

The goal of maximum likelihood

In Probability vs likelihood, the likelihood examine the probablity when we shift and move the distribution. The point of maximum likelihood is to find out the best distribution that can maximze the likelihood for the data, aka, find out the best line that fit the data y.

It’s a general approach can be applied to both linear and non-linear.

Why do we need maximum likelihood in logistic regression?

Because the least square method in linear regression does not work, as the transformed log involves +infinity and -infinity

The intuition of maximum likelihood

The idea is to find the constants so that the is the closest to the observed

Understand the intuition of maximum likelihood with math

It’s actually calculating a sum of series of independent events, each event is the observed outcome of each feature. The goal is to find the max p(x) so that it maximize the sum probablity of all events

Assume feature 1 is when , feature 2 is , …

Maximum likelihood is to get the max of p(x). So, for logistic regression, we substitute the logistic function to , and let the computer to find the best constant for us.

See more in details in Likelihood function.

Maximum likelihood in distributions