public static class LDA.Trainer extends ClassifierTrainer<double[]>
Constructor and Description |
---|
LDA.Trainer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setPriori(double[] priori)
Sets a priori probabilities of each class.
|
void |
setTolerance(double tol)
Sets covariance matrix singularity tolerance.
|
LDA |
train(double[][] x,
int[] y)
Learns a classifier with given training data.
|
setAttributes
public LDA.Trainer()
public void setPriori(double[] priori)
priori
- a priori probabilities of each class.public void setTolerance(double tol)
tol
- a tolerance to decide if a covariance matrix is singular.
The trainer will reject variables whose variance is less than tol2.public LDA train(double[][] x, int[] y)
ClassifierTrainer
train
in class ClassifierTrainer<double[]>
x
- the training instances.y
- the training labels.Copyright © 2015. All rights reserved.