T - datatype of input spacepublic class ApEvaluator<T> extends java.lang.Object implements java.io.Serializable, Evaluator<T>
Simple evaluation class for computing the mean average precision, VOC style.
Does training, evaluation and timing statistics.
| Constructor and Description |
|---|
ApEvaluator()
default constructor
|
ApEvaluator(Classifier<T> c,
java.util.List<TrainingSample<T>> trainList,
java.util.List<TrainingSample<T>> testList)
Constructor using a classifier, train and test lists.
|
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate()
Run the training procedure and compute score.
|
double |
getScore()
Tells the score resulting of the evaluation
|
void |
setClassifier(Classifier<T> cls)
Sets the classifier to use for evaluation
|
void |
setTestingSet(java.util.List<TrainingSample<T>> testlist)
Sets the list of testing samples on which to evaluate the classifier
|
void |
setTrainingSet(java.util.List<TrainingSample<T>> trainlist)
Sets the list of training samples on which to train the classifier
|
public ApEvaluator()
public ApEvaluator(Classifier<T> c, java.util.List<TrainingSample<T>> trainList, java.util.List<TrainingSample<T>> testList)
c - the classifiertrainList - the list of training samplestestList - the list on which to perform the evaluationpublic void evaluate()
Evaluatorpublic void setClassifier(Classifier<T> cls)
EvaluatorsetClassifier in interface Evaluator<T>cls - the classifierpublic void setTrainingSet(java.util.List<TrainingSample<T>> trainlist)
EvaluatorsetTrainingSet in interface Evaluator<T>trainlist - the training setpublic void setTestingSet(java.util.List<TrainingSample<T>> testlist)
EvaluatorsetTestingSet in interface Evaluator<T>testlist - the testing set