lda-train {stochmod} | R Documentation |
Training method for LDA.
LDA.train( x, y, cov.reg = 0.0 )
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] |
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.
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 |
Artem Sokolov Artem.Sokolov@gmail.com