Classes | Defines

LDA.h File Reference

Go to the source code of this file.


class  CLDA


 Class LDA implements regularized Linear Discriminant Analysis.

Define Documentation


Class LDA implements regularized Linear Discriminant Analysis.

LDA learns a linear classifier and requires examples to be CSimpleFeatures. The learned linear classification rule is optimal under the assumption that both classes a gaussian distributed with equal co-variance. To find a linear separation ${\bf w}$ in training, the in-between class variance is maximized and the within class variance is minimized, i.e.

\[ J({\bf w})=\frac{{\bf w^T} S_B {\bf w}}{{\bf w^T} S_W {\bf w}} \]

is maximized, where

\[S_b := ({\bf m_{+1}} - {\bf m_{-1}})({\bf m_{+1}} - {\bf m_{-1}})^T \]

is the between class scatter matrix and

\[S_w := \sum_{c\in\{-1,+1\}}\sum_{{\bf x}\in X_{c}}({\bf x} - {\bf m_c})({\bf x} - {\bf m_c})^T \]

is the within class scatter matrix with mean ${\bf m_c} := \frac{1}{N}\sum_{j=1}^N {\bf x_j^c}$ and $X_c:=\{x_1^c, \dots, x_N^c\}$ the set of examples of class c.

LDA is very fast for low-dimensional samples. The regularization parameter $\gamma$ (especially useful in the low sample case) should be tuned in cross-validation.

See also:

Definition at line 52 of file LDA.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation