# Multi-class LDA (pairwise classification)

From this post:

$$w=S_{W}^{-1}(μ1−μ2),$$

is used to estimate

$$w_{0}=\frac{1}{2}(μ_{1}−μ_{2})^{T}S_{W}^{-1}(μ_{1}−μ_{2})−log(\frac{P1}{P2}),$$

However, this is for a situation where there are only 2 classes. How can i adapt this so it can be applied to n number of classes (say 3 classes).

On Wikipedia, it's mentioned that:

Another common method is pairwise classification, where a new classifier is created for each pair of classes (giving C(C − 1)/2 classifiers in total), with the individual classifiers combined to produce a final classification.

But, how is this expressed in a similar way/formula to the above? Thanks.

• Your title is ambiguous. Either you are asking about LDA with k classes, or about a series of 2-class LDA classifiers. Jan 5 at 3:06
• @ttnphns Sorry, it would be LDA with k classes. Jan 5 at 3:12
• LDA with k classes is Rao's canonical LDA. It has two stages: extraction of discriminants and classification by them. There is a great number of posts here about it. Including a number of mine. Search the tag "discriminant-analysis". Jan 5 at 3:19
• @ttnphns I tried searching for more information on Rao's canonical LDA, but google search results direct me back to just regular LDA. Furthermore, if you meant the post where you linked a lot of answeres, I have mostly checked that out beforehand and found it a bit overwhelming. This was the closest (I think) that got me more information stats.stackexchange.com/a/22891/307324 Jan 5 at 3:53
• Canonical LDA is the "regular LDA" in multiclass situation. In the link you display, follow the link in my answer there and then the further links behind it. Jan 5 at 4:11