public abstract class BudgetedLearningAlgorithm extends Object implements MetaLearningAlgorithm, OnlineLearningAlgorithm, BinaryLearningAlgorithm
Modifier and Type | Field and Description |
---|---|
protected OnlineLearningAlgorithm |
baseAlgorithm |
protected int |
budget |
protected Label |
label |
Constructor and Description |
---|
BudgetedLearningAlgorithm() |
Modifier and Type | Method and Description |
---|---|
OnlineLearningAlgorithm |
getBaseAlgorithm()
Returns the base algorithm this meta algorithm is based on
|
int |
getBudget()
Returns the budget, i.e.
|
Label |
getLabel() |
List<Label> |
getLabels()
Returns the labels representing the concept to be learned.
|
PredictionFunction |
getPredictionFunction()
Returns the predictionFunction learned during the training process
|
void |
learn(Dataset dataset)
It starts the training process exploiting the provided
dataset |
Prediction |
learn(Example example)
Applies the learning process on a single example, updating its current model
|
abstract Prediction |
predictAndLearnWithFullBudget(Example example)
Learns from a single example applying a specific policy that must be adopted when the budget is reached
|
void |
setBaseAlgorithm(LearningAlgorithm baseAlgorithm) |
void |
setBudget(int budget)
Sets the budget, i.e.
|
void |
setLabel(Label label) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be learned.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
duplicate, reset
protected int budget
protected OnlineLearningAlgorithm baseAlgorithm
protected Label label
public int getBudget()
public void setBudget(int budget)
budget
- the budget to setpublic void setBaseAlgorithm(LearningAlgorithm baseAlgorithm)
setBaseAlgorithm
in interface MetaLearningAlgorithm
baseAlgorithm
- the baseAlgorithm to setpublic OnlineLearningAlgorithm getBaseAlgorithm()
MetaLearningAlgorithm
getBaseAlgorithm
in interface MetaLearningAlgorithm
public PredictionFunction getPredictionFunction()
LearningAlgorithm
getPredictionFunction
in interface LearningAlgorithm
public void setLabels(List<Label> labels)
LearningAlgorithm
setLabels
in interface BinaryLearningAlgorithm
setLabels
in interface LearningAlgorithm
labels
- the labels representing the concept to be learnedpublic List<Label> getLabels()
LearningAlgorithm
getLabels
in interface BinaryLearningAlgorithm
getLabels
in interface LearningAlgorithm
public void learn(Dataset dataset)
LearningAlgorithm
dataset
learn
in interface LearningAlgorithm
dataset
- the training datapublic Prediction learn(Example example)
OnlineLearningAlgorithm
learn
in interface OnlineLearningAlgorithm
example
- the instance to be exploited in the learning processexample
before the updating steppublic abstract Prediction predictAndLearnWithFullBudget(Example example)
example
- the example to be exploited in the learning processpublic Label getLabel()
getLabel
in interface BinaryLearningAlgorithm
public void setLabel(Label label)
setLabel
in interface BinaryLearningAlgorithm
Copyright © 2014 Semantic Analytics Group @ Uniroma2. All rights reserved.