S
- the type of observationT
- the type of categorypublic class CrossValidator<S extends Observation,T extends Category> extends ClassificationTester<S,T>
Modifier and Type | Field and Description |
---|---|
private int |
fold
The number of partitions for cross-validation.
|
Constructor and Description |
---|
CrossValidator(int fold)
Creates a new cross-validator with the given number of partitions.
|
Modifier and Type | Method and Description |
---|---|
double |
test(Trainer<S,T> trainer,
TrainingSet<S,T> trainingSet)
This methods takes a trainer and a training set and returns the performance
(in [0,1]) of the trained classifier on the training set (e.g.
|
test
public CrossValidator(int fold)
fold
- the number of partitions.public double test(Trainer<S,T> trainer, TrainingSet<S,T> trainingSet)
ClassificationTester
test
in class ClassificationTester<S extends Observation,T extends Category>
trainer
- some trainertrainingSet
- some training set