public abstract class PassiveAggressiveClassification extends PassiveAggressive implements ClassificationLearningAlgorithm
[CrammerJLMR2006] Koby Crammer, Ofer Dekel, Joseph Keshet, Shai Shalev-Shwartz and Yoram Singer Online Passive-Aggressive Algorithms. Journal of Machine Learning Research (2006)
The standard algorithm is modified, including the fairness extention from
[FiliceECIR2014] S. Filice, G. Castellucci, D. Croce, and R. Basili. Effective Kernelized Online Learning in Language Processing Tasks. In collection of Advances in Information Retrieval, pp. 347-358, Springer International Publishing, 2014.
| Modifier and Type | Class and Description |
|---|---|
static class |
PassiveAggressiveClassification.Loss |
PassiveAggressive.Policy| Modifier and Type | Field and Description |
|---|---|
protected BinaryClassifier |
classifier |
protected float |
cp |
protected boolean |
fairness |
protected PassiveAggressiveClassification.Loss |
loss |
c, label, policy| Constructor and Description |
|---|
PassiveAggressiveClassification() |
| Modifier and Type | Method and Description |
|---|---|
float |
getC() |
float |
getCn() |
float |
getCp() |
PassiveAggressiveClassification.Loss |
getLoss() |
BinaryClassifier |
getPredictionFunction()
Returns the classifier 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
|
void |
setC(float c) |
void |
setCn(float cn) |
void |
setCp(float cp) |
void |
setFairness(boolean fairness) |
void |
setLoss(PassiveAggressiveClassification.Loss loss) |
computeWeight, getLabel, getLabels, getPolicy, reset, setLabel, setLabels, setPolicyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitduplicate, getLabels, reset, setLabelsprotected PassiveAggressiveClassification.Loss loss
protected float cp
protected boolean fairness
protected BinaryClassifier classifier
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 float getC()
getC in class PassiveAggressivepublic void setC(float c)
setC in class PassiveAggressivec - the aggressiveness to setpublic PassiveAggressiveClassification.Loss getLoss()
public void setLoss(PassiveAggressiveClassification.Loss loss)
loss - the loss function type to setpublic BinaryClassifier getPredictionFunction()
ClassificationLearningAlgorithmgetPredictionFunction in interface ClassificationLearningAlgorithmgetPredictionFunction in interface LearningAlgorithmpublic BinaryMarginClassifierOutput learn(Example example)
OnlineLearningAlgorithmlearn in interface OnlineLearningAlgorithmexample - the instance to be exploited in the learning processexample before the updating steppublic void learn(Dataset dataset)
LearningAlgorithmdatasetlearn in interface LearningAlgorithmlearn in class PassiveAggressivedataset - the training dataCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.