public abstract class PassiveAggressive extends Object implements OnlineLearningAlgorithm, BinaryLearningAlgorithm
| Modifier and Type | Class and Description |
|---|---|
static class |
PassiveAggressive.Policy
It is the updating policy applied by the Passive Aggressive Algorithm when a miss-prediction occurs
|
| Modifier and Type | Field and Description |
|---|---|
protected float |
c |
protected Label |
label |
protected PassiveAggressive.Policy |
policy |
| Constructor and Description |
|---|
PassiveAggressive() |
| Modifier and Type | Method and Description |
|---|---|
protected float |
computeWeight(Example example,
float lossValue,
float exampleSquaredNorm,
float aggressiveness) |
float |
getC() |
Label |
getLabel() |
List<Label> |
getLabels()
Returns the labels representing the concept to be learned.
|
PassiveAggressive.Policy |
getPolicy() |
void |
learn(Dataset dataset)
It starts the training process exploiting the provided
dataset |
void |
reset()
Resets all the learning process, returning to the default state.
|
void |
setC(float c) |
void |
setLabel(Label label) |
void |
setLabels(List<Label> labels)
Sets the labels representing the concept to be learned.
|
void |
setPolicy(PassiveAggressive.Policy policy) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlearnduplicate, getPredictionFunctionprotected Label label
protected PassiveAggressive.Policy policy
protected float c
public void reset()
LearningAlgorithmreset in interface LearningAlgorithmpublic PassiveAggressive.Policy getPolicy()
public void setPolicy(PassiveAggressive.Policy policy)
policy - the updating policy to setpublic float getC()
public void setC(float c)
c - the aggressiveness to setprotected float computeWeight(Example example, float lossValue, float exampleSquaredNorm, float aggressiveness)
public void setLabels(List<Label> labels)
LearningAlgorithmsetLabels in interface BinaryLearningAlgorithmsetLabels in interface LearningAlgorithmlabels - the labels representing the concept to be learnedpublic List<Label> getLabels()
LearningAlgorithmgetLabels in interface BinaryLearningAlgorithmgetLabels in interface LearningAlgorithmpublic void learn(Dataset dataset)
LearningAlgorithmdatasetlearn in interface LearningAlgorithmdataset - the training datapublic Label getLabel()
getLabel in interface BinaryLearningAlgorithmpublic void setLabel(Label label)
setLabel in interface BinaryLearningAlgorithmCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.