Class ClassificationTester<S extends Observation,T extends Category> 
- Type Parameters:
- S- type of observations
- T- type of categories
- Direct Known Subclasses:
- CrossValidator
The `ClassificationTester` class is responsible for testing the performance of a classifier, either by cross-validation or by directly measuring the accuracy of the classifier on a test set. The performance is measured as a value between 0 and 1, where a higher value indicates better performance.
- Author:
- Matthias Thimm
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor for the `ClassificationTester` class.
- 
Method SummaryModifier and TypeMethodDescriptiondoubletest(Classifier classifier, TrainingSet<S, T> trainingSet) Measures the performance of the given classifier on the given test set.abstract doubleThis method takes a trainer and a training set and returns the performance (in the range [0,1]) of the trained classifier on the training set (e.g.
- 
Constructor Details- 
ClassificationTesterpublic ClassificationTester()Default constructor for the `ClassificationTester` class.This constructor is used to create an instance of the abstract class. Although this class cannot be instantiated directly, this constructor will be called by subclasses when they are instantiated. 
 
- 
- 
Method Details- 
testThis method takes a trainer and a training set and returns the performance (in the range [0,1]) of the trained classifier on the training set (e.g. using cross-validation). The larger the value, the better the trained classifier.- Parameters:
- trainer- some trainer
- trainingSet- some training set
- Returns:
- the performance of the trained classifier
 
- 
testMeasures the performance of the given classifier on the given test set.Every observation from the training set is classified by the classifier and its prediction is compared with the provided category. The return value is the ratio of the correctly classified observations to the total number of observations. - Parameters:
- classifier- some classifier.
- trainingSet- some training set.
- Returns:
- the performance of the given classifier
 
 
-