gov.sandia.cognition.learning.algorithm.perceptron
Class OnlinePassiveAggressivePerceptron.AbstractSoftMargin

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner<InputOutputPair<? extends InputType,OutputType>,ResultType>
          extended by gov.sandia.cognition.learning.algorithm.AbstractSupervisedBatchAndIncrementalLearner<Vectorizable,Boolean,LinearBinaryCategorizer>
              extended by gov.sandia.cognition.learning.algorithm.perceptron.AbstractOnlineLinearBinaryCategorizerLearner
                  extended by gov.sandia.cognition.learning.algorithm.perceptron.AbstractKernelizableBinaryCategorizerOnlineLearner
                      extended by gov.sandia.cognition.learning.algorithm.perceptron.AbstractLinearCombinationOnlineLearner
                          extended by gov.sandia.cognition.learning.algorithm.perceptron.OnlinePassiveAggressivePerceptron
                              extended by gov.sandia.cognition.learning.algorithm.perceptron.OnlinePassiveAggressivePerceptron.AbstractSoftMargin
All Implemented Interfaces:
BatchAndIncrementalLearner<InputOutputPair<? extends Vectorizable,Boolean>,LinearBinaryCategorizer>, BatchLearner<Collection<? extends InputOutputPair<? extends Vectorizable,Boolean>>,LinearBinaryCategorizer>, IncrementalLearner<InputOutputPair<? extends Vectorizable,Boolean>,LinearBinaryCategorizer>, KernelizableBinaryCategorizerOnlineLearner, SupervisedBatchAndIncrementalLearner<Vectorizable,Boolean,LinearBinaryCategorizer>, SupervisedBatchLearner<Vectorizable,Boolean,LinearBinaryCategorizer>, SupervisedIncrementalLearner<Vectorizable,Boolean,LinearBinaryCategorizer>, VectorFactoryContainer, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
OnlinePassiveAggressivePerceptron.LinearSoftMargin, OnlinePassiveAggressivePerceptron.QuadraticSoftMargin
Enclosing class:
OnlinePassiveAggressivePerceptron

public abstract static class OnlinePassiveAggressivePerceptron.AbstractSoftMargin
extends OnlinePassiveAggressivePerceptron

An abstract class for soft-margin versions of the Passive-Aggressive algorithm. Stores the aggressiveness parameter (C).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.learning.algorithm.perceptron.OnlinePassiveAggressivePerceptron
OnlinePassiveAggressivePerceptron.AbstractSoftMargin, OnlinePassiveAggressivePerceptron.LinearSoftMargin, OnlinePassiveAggressivePerceptron.QuadraticSoftMargin
 
Field Summary
protected  double aggressiveness
          The aggressiveness parameter (C), which is the trade-off between aggressive updating to meet an incorrect example and keeping history around.
static double DEFAULT_AGGRESSIVENESS
          The default aggressiveness is 0.0010.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.OnlinePassiveAggressivePerceptron
DEFAULT_UPDATE_BIAS
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractLinearCombinationOnlineLearner
updateBias
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractOnlineLinearBinaryCategorizerLearner
vectorFactory
 
Constructor Summary
OnlinePassiveAggressivePerceptron.AbstractSoftMargin()
          Creates a new AbstractSoftMargin with default parameters.
OnlinePassiveAggressivePerceptron.AbstractSoftMargin(double aggressiveness)
          Creates a new AbstractSoftMargin with the given aggressiveness.
OnlinePassiveAggressivePerceptron.AbstractSoftMargin(double aggressiveness, VectorFactory<?> vectorFactory)
          Creates a new AbstractSoftMargin with the given parameters.
 
Method Summary
 double getAggressiveness()
          Gets the aggressiveness parameter (C), which is the trade-off between aggressive updating to meet an incorrect example and keeping history around.
 void setAggressiveness(double aggressiveness)
          Sets the aggressiveness parameter (C), which is the trade-off between aggressive updating to meet an incorrect example and keeping history around.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.OnlinePassiveAggressivePerceptron
computeUpdate, computeUpdate, computeUpdate
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractLinearCombinationOnlineLearner
computeDecay, computeDecay, computeRescaling, computeRescaling, createInitialLearnedObject, initialize, initialize, isUpdateBias, setUpdateBias, update, update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractKernelizableBinaryCategorizerOnlineLearner
createKernelLearner, learn, update, update, update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractOnlineLinearBinaryCategorizerLearner
createInitialLearnedObject, getVectorFactory, setVectorFactory, update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractSupervisedBatchAndIncrementalLearner
update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner
clone, learn, learn, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.SupervisedIncrementalLearner
update
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchAndIncrementalLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
createInitialLearnedObject, update, update
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

DEFAULT_AGGRESSIVENESS

public static final double DEFAULT_AGGRESSIVENESS
The default aggressiveness is 0.0010.

See Also:
Constant Field Values

aggressiveness

protected double aggressiveness
The aggressiveness parameter (C), which is the trade-off between aggressive updating to meet an incorrect example and keeping history around.

Constructor Detail

OnlinePassiveAggressivePerceptron.AbstractSoftMargin

public OnlinePassiveAggressivePerceptron.AbstractSoftMargin()
Creates a new AbstractSoftMargin with default parameters.


OnlinePassiveAggressivePerceptron.AbstractSoftMargin

public OnlinePassiveAggressivePerceptron.AbstractSoftMargin(double aggressiveness)
Creates a new AbstractSoftMargin with the given aggressiveness.

Parameters:
aggressiveness - The aggressiveness. Must be positive.

OnlinePassiveAggressivePerceptron.AbstractSoftMargin

public OnlinePassiveAggressivePerceptron.AbstractSoftMargin(double aggressiveness,
                                                            VectorFactory<?> vectorFactory)
Creates a new AbstractSoftMargin with the given parameters.

Parameters:
aggressiveness - The aggressiveness. Must be positive.
vectorFactory - The factory to use to create new weight vectors.
Method Detail

getAggressiveness

public double getAggressiveness()
Gets the aggressiveness parameter (C), which is the trade-off between aggressive updating to meet an incorrect example and keeping history around.

Returns:
The aggressiveness. Must be positive.

setAggressiveness

public void setAggressiveness(double aggressiveness)
Sets the aggressiveness parameter (C), which is the trade-off between aggressive updating to meet an incorrect example and keeping history around.

Parameters:
aggressiveness - The aggressiveness. Must be positive.