By Kardi Teknomo, PhD .

Linear Discriminant Analysis (LDA) Formula Tutorial

< Previous | Next | Index >

Linear Discriminant Analysis (LDA) Formula

If there are Bayes Rule groups, the Bayes' rule is minimize the total error of classification by assigning the object to group Conditional Probability which has the highest conditional probability where Bayes Theorem . Since we cannot get Bayes Rule (i.e. given the measurement, what is the probability of the class) directly from the measurement and we can obtain Bayes Rule (i.e. given the class, we get the measurement and compute the probability for each class), then we use Bayes Theorem:

Bayes Rule

Thus, the Bayes' Rule becomes:

Assign the object to group Bayes Rule if

Bayes Rule

The denominators for both sides of inequality are positive and the same, therefore we can cancel them out to become

Assign the object to group Bayes Rule if

Quadratic Discriminant

If we have many classes and many dimension of measurement which each dimension will have many values, the computation of conditional probability Quadratic Discriminant requires a lot of data. It is more practical to assume that the data come from some theoretical distribution. The most widely used assumption is that our data come from Multivariate Normal distribution which formula is given as

Quadratic Discriminant

Where, Quadratic Discriminant is vector mean and Quadratic Discriminant is covariance matrix of group i. Inputting the distribution formula into Bayes rule we have:

Assign object with measurement Quadratic Discriminant to group Quadratic Discriminant if

LDA Formula

Since factor of LDA Formula are equal for both sides, we can cancel out

LDA Formula

Take logarithmic of both sides

LDA Formula Multiply both sides with -2, we need to change the sign of inequality

LDA Formula

Let LDA Formula we have

Assign object with measurement LDA Formula to group LDA Formula if

LDA Formula

That is Quadratic Discriminant function

If all covariance matrices are equal LDA Formula , then we can simplify further into

LDA Formula

We can write LDA Formula into LDA Formula . Thus, the inequality becomes

LDA Formula We can cancel out the first and third terms (i.e. LDA Formula and LDA Formula ) of both sides because they do not affect the grouping decision. Thus, we have

LDA Formula

We multiply both sides of inequality with LDA Formula (the sign of inequality reverse because we multiply with negative value), we have

LDA Formula

Let LDA Formula , we have

Assign object with measurement LDA Formula to group LDA Formula if

LDA Formula

That is Linear Discriminant function

Thus, Linear Discriminant Analysis has assumption of Multivariate Normal distribution and all groups have the same covariance matrix.

< Previous | Next | Index >

This tutorial is copyrighted .

Preferable reference for this tutorial is

Teknomo, Kardi (2015) Discriminant Analysis Tutorial. http://people.revoledu.com/kardi/ tutorial/LDA/