lda-train {stochmod}R Documentation

Linear Discriminant Analysis

Description

Training method for LDA.

Usage

LDA.train( x, y, cov.reg = 0.0 )

Arguments

x N x p data matrix of N samples in p dimensions
y N x 1 vector of labels
cov.reg Covariance matrix regularization (towards identity), value must be in [0, 1]

Details

Models each class as a single (multivariate) Gaussian and uses a single common covariance matrix across all classes. Computes the distribution parameters, the Bayesian class priors, and the discriminant functions. LDA is insensitive to temporal structure of the data and, therefore, only needs to work with a single observation sequence. This, in turn, requires a label for each sample.

Value

An LDA classifier defined by:

labels Vector of unique class labels
priors K x 1 vector of priors, estimated as fraction of points from each class
means K x p matrix of means approximated from the data
covmat The common p x p covariance matrix
weights K x (p+1) matrix of weights and the bias term for each of the K discriminant functions

Author(s)

Artem Sokolov Artem.Sokolov@gmail.com


[Package stochmod version 1.2 Index]