public class Stoptron extends BudgetedLearningAlgorithm implements MetaLearningAlgorithm
[OrabonaICML2008] Francesco Orabona, Joseph Keshet, and Barbara Caputo. The projectron: a bounded kernel-based perceptron. In Int. Conf. on Machine Learning (2008)
Until the budget is not reached the online learning updating policy is the one of the baseAlgorithm that this meta-algorithm is exploiting. When the budget is full, the learning process ends
budget, label
Constructor and Description |
---|
Stoptron() |
Stoptron(int budget,
OnlineLearningAlgorithm baseAlgorithm,
Label label) |
Modifier and Type | Method and Description |
---|---|
Stoptron |
duplicate()
Creates a new instance of the LearningAlgorithm initialized with the same parameters
of the learningAlgorithm to be duplicated.
|
OnlineLearningAlgorithm |
getBaseAlgorithm()
Returns the base algorithm this meta algorithm is based on
|
Kernel |
getKernel()
Returns the kernel exploited by this learner
|
PredictionFunction |
getPredictionFunction()
Returns the predictionFunction learned during the training process
|
protected Prediction |
predictAndLearnWithAvailableBudget(Example example) |
protected Prediction |
predictAndLearnWithFullBudget(Example example)
Learns from a single example applying a specific policy that must be adopted when the budget is reached
|
void |
reset()
Resets all the learning process, returning to the default state.
|
void |
setBaseAlgorithm(LearningAlgorithm baseAlgorithm) |
void |
setKernel(Kernel kernel)
Sets the kernel this
|
void |
setPredictionFunction(PredictionFunction predictionFunction)
Sets the predictionFunction learned during the training process.
|
getBudget, getLabel, getLabels, learn, learn, setBudget, setLabel, setLabels
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLabels, learn, setLabels
public Stoptron()
public Stoptron(int budget, OnlineLearningAlgorithm baseAlgorithm, Label label)
public Stoptron duplicate()
LearningAlgorithm
duplicate
in interface LearningAlgorithm
public void reset()
LearningAlgorithm
reset
in interface LearningAlgorithm
protected Prediction predictAndLearnWithFullBudget(Example example)
BudgetedLearningAlgorithm
predictAndLearnWithFullBudget
in class BudgetedLearningAlgorithm
example
- the example to be exploited in the learning processpublic 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 Kernel getKernel()
KernelMethod
getKernel
in interface KernelMethod
public void setKernel(Kernel kernel)
KernelMethod
setKernel
in interface KernelMethod
kernel
- the kernel to setprotected Prediction predictAndLearnWithAvailableBudget(Example example)
predictAndLearnWithAvailableBudget
in class BudgetedLearningAlgorithm
public void setPredictionFunction(PredictionFunction predictionFunction)
LearningAlgorithm
setPredictionFunction
in interface LearningAlgorithm
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.