public class OneVsOneLearning extends Object implements ClassificationLearningAlgorithm, MetaLearningAlgorithm
NOTE: the base learning algorithm must provide a duplicate method which properly works
| Constructor and Description |
|---|
OneVsOneLearning() |
| Modifier and Type | Method and Description |
|---|---|
OneVsOneLearning |
duplicate()
This method will duplicate the current Learning algorithm
|
LearningAlgorithm |
getBaseAlgorithm()
This method will return the base algorithm.
|
List<Label> |
getLabels()
Returns the labels to be learned applying a one-vs-one strategy
|
OneVsOneClassifier |
getPredictionFunction()
This method returns the learned PredictionFunction.
|
void |
learn(Dataset dataset)
This method will cause the meta-learning algorithm to learn
N*(N-1)/2 classifiers, where N is the number of classes in the dataset.
|
void |
reset()
This method will cause the reset of all the base algorithms
|
void |
setBaseAlgorithm(LearningAlgorithm baseAlgorithm)
This method will set the type of the base algorithms to be learned.
|
void |
setLabels(List<Label> labels)
Set the labels associated to this multi-classifier.
|
void |
setPredictionFunction(PredictionFunction predictionFunction)
Sets the predictionFunction learned during the training process.
|
public void setLabels(List<Label> labels)
setLabels in interface LearningAlgorithmlabels - the labels representing the concept to be learnedpublic List<Label> getLabels()
getLabels in interface LearningAlgorithmpublic void learn(Dataset dataset)
learn in interface LearningAlgorithmdataset - the training datapublic void reset()
reset in interface LearningAlgorithmpublic OneVsOneClassifier getPredictionFunction()
getPredictionFunction in interface ClassificationLearningAlgorithmgetPredictionFunction in interface LearningAlgorithmpublic void setBaseAlgorithm(LearningAlgorithm baseAlgorithm)
setBaseAlgorithm in interface MetaLearningAlgorithmbaseAlgorithm - the baseAlgorithm to setpublic LearningAlgorithm getBaseAlgorithm()
getBaseAlgorithm in interface MetaLearningAlgorithmpublic OneVsOneLearning duplicate()
duplicate in interface LearningAlgorithmpublic void setPredictionFunction(PredictionFunction predictionFunction)
LearningAlgorithmsetPredictionFunction in interface LearningAlgorithmCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.