gov.sandia.cognition.learning.algorithm.confidence
Class AdaptiveRegularizationOfWeights

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,DefaultConfidenceWeightedBinaryCategorizer>
              extended by gov.sandia.cognition.learning.algorithm.confidence.AdaptiveRegularizationOfWeights
All Implemented Interfaces:
BatchAndIncrementalLearner<InputOutputPair<? extends Vectorizable,Boolean>,DefaultConfidenceWeightedBinaryCategorizer>, BatchLearner<Collection<? extends InputOutputPair<? extends Vectorizable,Boolean>>,DefaultConfidenceWeightedBinaryCategorizer>, IncrementalLearner<InputOutputPair<? extends Vectorizable,Boolean>,DefaultConfidenceWeightedBinaryCategorizer>, SupervisedBatchAndIncrementalLearner<Vectorizable,Boolean,DefaultConfidenceWeightedBinaryCategorizer>, SupervisedBatchLearner<Vectorizable,Boolean,DefaultConfidenceWeightedBinaryCategorizer>, SupervisedIncrementalLearner<Vectorizable,Boolean,DefaultConfidenceWeightedBinaryCategorizer>, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author={"Koby Crammer","Alex Kulesza","Mark Dredze"},
                      title="Adpative Regularization of Weight Vectors",
                      year=2009,
                      type=Conference,
                      publication="Advances in Neural Information Processing Systems",
                      url="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.169.4127&rep=rep1&type=pdf")
public class AdaptiveRegularizationOfWeights
extends AbstractSupervisedBatchAndIncrementalLearner<Vectorizable,Boolean,DefaultConfidenceWeightedBinaryCategorizer>

An implementation of the Adaptive Regularization of Weights (AROW) algorithm for online learning of a linear binary categorizer. It is a confidence-weighted algorithm that keeps track of the full covariance matrix when updating the learner.

Since:
3.3.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
static double DEFAULT_R
          The default value of r is 0.0010.
protected  double r
          The r parameter that controls regularization weight.
 
Constructor Summary
AdaptiveRegularizationOfWeights()
          Creates a new AdaptiveRegularizationOfWeights with default parameters.
AdaptiveRegularizationOfWeights(double r)
          Creates a new AdaptiveRegularizationOfWeights with the given parameters
 
Method Summary
 DefaultConfidenceWeightedBinaryCategorizer createInitialLearnedObject()
          Creates a new initial learned object, before any data is given.
 double getR()
          Gets the regularization parameter.
 void setR(double r)
          Sets the regularization parameter.
 void update(DefaultConfidenceWeightedBinaryCategorizer target, Vector input, boolean label)
          Perform an update for the target using the given input and associated label.
 void update(DefaultConfidenceWeightedBinaryCategorizer target, Vectorizable input, Boolean output)
          The update method updates an object of ResultType using the given a new supervised input-output pair, using some form of "learning" algorithm.
 
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.BatchAndIncrementalLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
update
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

DEFAULT_R

public static final double DEFAULT_R
The default value of r is 0.0010.

See Also:
Constant Field Values

r

protected double r
The r parameter that controls regularization weight. Must be positive.

Constructor Detail

AdaptiveRegularizationOfWeights

public AdaptiveRegularizationOfWeights()
Creates a new AdaptiveRegularizationOfWeights with default parameters.


AdaptiveRegularizationOfWeights

public AdaptiveRegularizationOfWeights(double r)
Creates a new AdaptiveRegularizationOfWeights with the given parameters

Parameters:
r - The regularization parameter. Must be positive.
Method Detail

createInitialLearnedObject

public DefaultConfidenceWeightedBinaryCategorizer createInitialLearnedObject()
Description copied from interface: IncrementalLearner
Creates a new initial learned object, before any data is given.

Returns:
The initial learned object.

update

public void update(DefaultConfidenceWeightedBinaryCategorizer target,
                   Vectorizable input,
                   Boolean output)
Description copied from interface: SupervisedIncrementalLearner
The update method updates an object of ResultType using the given a new supervised input-output pair, using some form of "learning" algorithm.

Parameters:
target - The object to update.
input - The supervised input to learn from.
output - The supervised output to learn from.

update

public void update(DefaultConfidenceWeightedBinaryCategorizer target,
                   Vector input,
                   boolean label)
Perform an update for the target using the given input and associated label.

Parameters:
target - The target to update.
input - The input value.
label - The label associated with the input.

getR

public double getR()
Gets the regularization parameter.

Returns:
The regularization parameter. Must be positive.

setR

public void setR(double r)
Sets the regularization parameter.

Parameters:
r - The regularization parameter. Must be positive.