public class BudgetedPassiveAggressiveClassification extends BudgetedLearningAlgorithm
Modifier and Type | Class and Description |
---|---|
static class |
BudgetedPassiveAggressiveClassification.DeletingPolicy
It is the updating policy applied when the budget is full.
|
budget, label
Constructor and Description |
---|
BudgetedPassiveAggressiveClassification() |
BudgetedPassiveAggressiveClassification(int budget,
Kernel kernel,
float c,
boolean fairness,
BudgetedPassiveAggressiveClassification.DeletingPolicy deletingPolicy,
Label label) |
BudgetedPassiveAggressiveClassification(int budget,
Kernel kernel,
float cp,
float cn,
BudgetedPassiveAggressiveClassification.DeletingPolicy deletingPolicy,
Label label) |
Modifier and Type | Method and Description |
---|---|
LearningAlgorithm |
duplicate()
Creates a new instance of the LearningAlgorithm initialized with the same parameters
of the learningAlgorithm to be duplicated.
|
float |
getCn() |
float |
getCp() |
BudgetedPassiveAggressiveClassification.DeletingPolicy |
getDeletingPolicy() |
Kernel |
getKernel()
Returns the kernel exploited by this learner
|
BinaryKernelMachineClassifier |
getPredictionFunction()
Returns the predictionFunction learned during the training process
|
boolean |
isFairness() |
void |
learn(Dataset dataset)
It starts the training process exploiting the provided
dataset |
BinaryMarginClassifierOutput |
learn(Example example)
Applies the learning process on a single example, updating its current model
|
protected BinaryMarginClassifierOutput |
predictAndLearnWithAvailableBudget(Example example) |
protected BinaryMarginClassifierOutput |
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 |
setC(float c) |
void |
setCn(float cn) |
void |
setCp(float cp) |
void |
setDeletingPolicy(BudgetedPassiveAggressiveClassification.DeletingPolicy deletingPolicy) |
void |
setFairness(boolean fairness) |
void |
setKernel(Kernel kernel)
Sets the kernel this
|
public BudgetedPassiveAggressiveClassification()
public BudgetedPassiveAggressiveClassification(int budget, Kernel kernel, float cp, float cn, BudgetedPassiveAggressiveClassification.DeletingPolicy deletingPolicy, Label label)
public BudgetedPassiveAggressiveClassification(int budget, Kernel kernel, float c, boolean fairness, BudgetedPassiveAggressiveClassification.DeletingPolicy deletingPolicy, Label label)
public boolean isFairness()
public void setFairness(boolean fairness)
fairness
- the fairness to setpublic float getCp()
public void setCp(float cp)
cp
- the aggressiveness parameter for positive examplespublic float getCn()
public void setCn(float cn)
cn
- the aggressiveness parameter for negative examplespublic void setC(float c)
c
- the aggressiveness parameterpublic BudgetedPassiveAggressiveClassification.DeletingPolicy getDeletingPolicy()
public void setDeletingPolicy(BudgetedPassiveAggressiveClassification.DeletingPolicy deletingPolicy)
deletingPolicy
- the deletingPolicy to setpublic LearningAlgorithm duplicate()
LearningAlgorithm
public void reset()
LearningAlgorithm
public BinaryKernelMachineClassifier getPredictionFunction()
LearningAlgorithm
public Kernel getKernel()
KernelMethod
public void setKernel(Kernel kernel)
KernelMethod
kernel
- the kernel to setprotected BinaryMarginClassifierOutput predictAndLearnWithAvailableBudget(Example example)
predictAndLearnWithAvailableBudget
in class BudgetedLearningAlgorithm
protected BinaryMarginClassifierOutput predictAndLearnWithFullBudget(Example example)
BudgetedLearningAlgorithm
predictAndLearnWithFullBudget
in class BudgetedLearningAlgorithm
example
- the example to be exploited in the learning processpublic void learn(Dataset dataset)
LearningAlgorithm
dataset
learn
in interface LearningAlgorithm
learn
in class BudgetedLearningAlgorithm
dataset
- the training datapublic BinaryMarginClassifierOutput learn(Example example)
OnlineLearningAlgorithm
learn
in interface OnlineLearningAlgorithm
learn
in class BudgetedLearningAlgorithm
example
- the instance to be exploited in the learning processexample
before the updating stepCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.