Adapted from an appendix of my MS thesis.
Linear Discriminant Analysis
Decision Boundary Derivation
Decision theory for classification tells us that we need to know the class posteriors for optimal classification. Suppose is the conditional density of for class , and let be the prior probability of class , with . Bayes theorem gives us the following [1].
Many machine learning techniques are based on models for the class densities. For example, linear and quadratic discriminant analysis use Gaussian densities. More flexible Gaussian mixture models (GMMs) allow for nonlinear decision boundaries. General nonparametric density estimates for each class density allow the most flexibility. Naive Bayes models are a variant of the previous case, and assume that the inputs are conditionally independent in each class [1].
Suppose that each class density is modeled as a multivariate Gaussian [1].
Linear discriminant analysis (LDA) is the special case when we assume that the classes have a common covariance matrix . When we compare the log-ratio of two classes and we get an equation linear in . The equal covariance matrices cause the normalization factors to cancel, as well as the quadratic part in the exponents. This linear log-odds function implies that the decision boundary between classes and is linear in [1].
The linear discriminant functions are an equivalent description of the decision rule, with [1].
In practice we do not know the parameters of the Gaussian distributions, and need to estimate them using training data [1].
, where is the number of observations from class ,
,
.
In the general discriminant problem, if the are not assumed to be equal, then the convenient cancellations in the equation do not take place. In particular the pieces quadratic in remain. We then get quadratic discriminant analysis (QDA). The decision boundary between each pair of classes and is described by a quadratic equation [1].
Both LDA and QDA perform well on an amazingly large and diverse set of classification tasks. The question is why LDA and QDA have such a good track record. The reason is likely not that the data are approximately Gaussian, and in addition for LDA that the covariances are approximately equal. More likely the reason is that the data can only support simple decision boundaries such as linear or quadratic, and the estimates provided by the Gaussian models are stable. This is a bias variance tradeoff where we put up with the bias of a linear decision boundary because it can be estimated with much lower variance than more exotic alternatives [1].
References
- Trevor Hastie, Robert Tibshirani, Jerome Friedman (2009) The Elements of Statistical Learning. Springer New York.


Top comments (0)