title: Maximum Likelihood Estimation of a marginal model sidebar: sidebar-foundations
Most of the models in supervised machine learning are estimated using the ML principle. In this section we introduce the principle and outline the objective function of the ML estimator that has wide applicability in many learning tasks. Assume that we have examples drawn from a data generator that generates the vectors independently and identically distributed (i.i.d.) according to some unknown (but fixed) probability distribution function . Let a parametric family of probability distributions (our hypothesis set) over the same space that attempts to approximate (model) as closely as possible using a suitable estimate of the parameter vector . The ML estimator for is defined as: From the last expression it is evident that in ML estimation two distributions are involved: and . We can also make use of our intuition that a good estimator would minimize the distance between the two empirical distributions therefore the KL divergence: The 1st term is independent of the model and therefore we see that the KL and the ML estimator expressions are identical except from the sign. Therefore we conclude that minimizing KL divergence, maximizes the likelihood function. From information theory we know that the KL divergence and the cross entropy (CE) are related via the expression Given that is given in supervised learning, is constant and therefore we can conclude that in this case, CE is equivalent to the KL i.e. minimizing the KL divergence, is equivalent in minimizing cross-entropy (CE). Therefore the expression the only need to minimize which we will call the CE cost function (also known as log loss) is: Cross entropy is a very generic objective (loss) function that is applicable to any supervised learning problem that uses maximum likelihood to estimate a model. To visualize the above, lets start with a simple Gaussian distribution.Code
Code
Code
Code
Code
Code
Code
Code
Code
Code
Code
Code
Code
Code
References
- Maximum Likelihood Estimation of Gaussian Parameters - The math are not renferred properly so you can find this important reference in a notebook in the course site.
- Section 4.1 - Numerical computation
- Bayes for beginners - probability and likelihood
Found an error on this page? Report an issue.

