Fisher Discriminant Analysis (FDA)

Described in [Mika01].

class mlpy.Fda(C=1)

Fisher Discriminant Analysis.

Initialize Fda class.

Input

  • C - [float] Regularization parameter
compute(x, y)

Compute fda model.

Input

  • x - [2D numpy array float] (sample x feature) training data
  • y - [1D numpy array integer] (two classes, 1 or -1) classes

Output

  • 1
predict(p)

Predict fda model on test point(s).

Input

  • p - [1D or 2D numpy array float] test point(s)

Output

  • cl - [integer or 1D numpy array integer] class(es) predicted
  • self.realpred - [float or 1D numpy array float] real valued prediction
weights(x, y)

Return feature weights.

Input

  • x - [2D numpy array float] (sample x feature) training data
  • y - [1D numpy array integer] (two classes, 1 or -1) classes

Output

  • fw - [1D numpy array float] feature weights
[Mika01]S Mika and A Smola and B Scholkopf. An improved training algorithm for kernel fisher discriminants. Proceedings AISTATS 2001, 2001.
[Cristianini02]N Cristianini, J Shawe-Taylor and A Elisseeff. On Kernel-Target Alignment. Advances in Neural Information Processing Systems, Volume 14, 2002.

Previous topic

K Nearest Neighbor (KNN)

Next topic

Spectral Regression Discriminant Analysis (SRDA)

This Page