public class OneVsAllLearning extends Object implements ClassificationLearningAlgorithm, MetaLearningAlgorithm
NOTE: the base learning algorithm must provide a duplicate method which properly works
Constructor and Description |
---|
OneVsAllLearning() |
Modifier and Type | Method and Description |
---|---|
OneVsAllLearning |
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-all strategy
|
OneVsAllClassifier |
getPredictionFunction()
This method returns the learned PredictionFunction.
|
void |
initialize() |
void |
initializeWithPredictionFunction(OneVsAllClassifier oneVsAllClassifier)
Deprecated.
|
void |
learn(Dataset dataset)
This method will cause the meta-learning algorithm to learn
N 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 LearningAlgorithm
labels
- the labels representing the concept to be learnedpublic List<Label> getLabels()
getLabels
in interface LearningAlgorithm
public void initialize()
@Deprecated public void initializeWithPredictionFunction(OneVsAllClassifier oneVsAllClassifier)
public void learn(Dataset dataset)
learn
in interface LearningAlgorithm
dataset
- the training datapublic void reset()
reset
in interface LearningAlgorithm
public OneVsAllClassifier getPredictionFunction()
getPredictionFunction
in interface ClassificationLearningAlgorithm
getPredictionFunction
in interface LearningAlgorithm
public void setBaseAlgorithm(LearningAlgorithm baseAlgorithm)
setBaseAlgorithm
in interface MetaLearningAlgorithm
baseAlgorithm
- the baseAlgorithm to setpublic LearningAlgorithm getBaseAlgorithm()
getBaseAlgorithm
in interface MetaLearningAlgorithm
public OneVsAllLearning duplicate()
duplicate
in interface LearningAlgorithm
public void setPredictionFunction(PredictionFunction predictionFunction)
LearningAlgorithm
setPredictionFunction
in interface LearningAlgorithm
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.