public static class OnlinePassiveAggressivePerceptron.QuadraticSoftMargin extends OnlinePassiveAggressivePerceptron.AbstractSoftMargin
OnlinePassiveAggressivePerceptron.AbstractSoftMargin, OnlinePassiveAggressivePerceptron.LinearSoftMargin, OnlinePassiveAggressivePerceptron.QuadraticSoftMarginaggressiveness, DEFAULT_AGGRESSIVENESSDEFAULT_UPDATE_BIASupdateBiasvectorFactory| Constructor and Description |
|---|
QuadraticSoftMargin()
Creates a new
QuadraticSoftMargin with default parameters. |
QuadraticSoftMargin(double aggressiveness)
Creates a new
QuadraticSoftMargin with the given
aggressiveness. |
QuadraticSoftMargin(double aggressiveness,
VectorFactory<?> vectorFactory)
Creates a new
QuadraticSoftMargin with the given parameters. |
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeUpdate(double actual,
double predicted,
double loss,
double inputNorm2Squared)
Compute the update value (tau) for the algorithm.
|
getAggressiveness, setAggressivenesscomputeUpdate, computeUpdatecomputeDecay, computeDecay, computeRescaling, computeRescaling, createInitialLearnedObject, initialize, initialize, isUpdateBias, setUpdateBias, update, updatecreateKernelLearner, learn, update, update, updatecreateInitialLearnedObject, getVectorFactory, setVectorFactory, updateupdateclone, learn, learn, updateequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdatelearnlearncreateInitialLearnedObject, update, updateclonepublic QuadraticSoftMargin()
QuadraticSoftMargin with default parameters.public QuadraticSoftMargin(double aggressiveness)
QuadraticSoftMargin with the given
aggressiveness.aggressiveness - The aggressiveness. Must be positive.public QuadraticSoftMargin(double aggressiveness,
VectorFactory<?> vectorFactory)
QuadraticSoftMargin with the given parameters.aggressiveness - The aggressiveness. Must be positive.vectorFactory - The factory to use to create new weight vectors.protected double computeUpdate(double actual,
double predicted,
double loss,
double inputNorm2Squared)
OnlinePassiveAggressivePerceptroncomputeUpdate in class OnlinePassiveAggressivePerceptronactual - The actual label represented as a double (-1 or +1).predicted - The value predicted by the current categorizer (w * x + b).loss - The loss function (1 - predicted).inputNorm2Squared - The squared 2-norm of the input (||x||^2).