public class RandomizedBudgetPerceptron extends BudgetedLearningAlgorithm implements MetaLearningAlgorithm
[CavallantiCOLT2006] G. Cavallanti, N. Cesa-Bianchi, C. Gentile. Tracking the best hyperplane with a simple budget Perceptron. In proc. of the 19-th annual conference on Computational Learning Theory. (2006)
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, a random support vector is deleted and the perceptron updating policy is adopted
budget, label
Constructor and Description |
---|
RandomizedBudgetPerceptron() |
RandomizedBudgetPerceptron(int budget,
OnlineLearningAlgorithm baseAlgorithm,
long seed,
Label label) |
Modifier and Type | Method and Description |
---|---|
RandomizedBudgetPerceptron |
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.
|
void |
setSeed(long seed)
Sets the seed for the random generator adopted to select the support vector to delete
|
getBudget, getLabel, getLabels, learn, learn, setBudget, setLabel, setLabels
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLabels, learn, setLabels
public RandomizedBudgetPerceptron()
public RandomizedBudgetPerceptron(int budget, OnlineLearningAlgorithm baseAlgorithm, long seed, Label label)
public void setSeed(long seed)
seed
- the seed of the randomGeneratorpublic RandomizedBudgetPerceptron 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.