SHOGUN v0.9.0
组合类型 | 宏定义
LDA.h文件参考

浏览该文件的源代码。

组合类型

class  CLDA

宏定义

#define IGNORE_IN_CLASSLIST
 Class LDA implements regularized Linear Discriminant Analysis.

宏定义文档

#define IGNORE_IN_CLASSLIST

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.

参见:
CLinearClassifier
http://en.wikipedia.org/wiki/Linear_discriminant_analysis

在文件LDA.h52行定义。


SHOGUN Machine Learning Toolbox - Documentation