Link: Logistic regression
The goal of maximum likelihood
First of all, it’s a general approach that can be applied to both linear and non-linear. The goal is to find out the best line that fit the data y
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.