gov.sandia.cognition.learning.algorithm.perceptron
Class OnlineMultiPerceptron.UniformUpdate<CategoryType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner<InputOutputPair<? extends Vectorizable,CategoryType>,LinearMultiCategorizer<CategoryType>>
          extended by gov.sandia.cognition.learning.algorithm.perceptron.OnlineMultiPerceptron<CategoryType>
              extended by gov.sandia.cognition.learning.algorithm.perceptron.OnlineMultiPerceptron.UniformUpdate<CategoryType>
Type Parameters:
CategoryType - The type of output categories. Can be any type that has a valid equals and hashCode method.
All Implemented Interfaces:
BatchAndIncrementalLearner<InputOutputPair<? extends Vectorizable,CategoryType>,LinearMultiCategorizer<CategoryType>>, BatchLearner<Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>>,LinearMultiCategorizer<CategoryType>>, IncrementalLearner<InputOutputPair<? extends Vectorizable,CategoryType>,LinearMultiCategorizer<CategoryType>>, VectorFactoryContainer, CloneableSerializable, Serializable, Cloneable
Enclosing class:
OnlineMultiPerceptron<CategoryType>

@PublicationReference(title="Ultraconservative online algorithms for multiclass problems",
                      author={"Koby Crammer","Yoram Singer"},
                      year=2003,
                      type=Journal,
                      publication="The Journal of Machine Learning Research",
                      pages={951,991},
                      url="http://portal.acm.org/citation.cfm?id=944936")
public static class OnlineMultiPerceptron.UniformUpdate<CategoryType>
extends OnlineMultiPerceptron<CategoryType>

Variant of a multi-category Perceptron that performs a uniform weight update on all categories that are scored higher than the true category such that the weights are equal and sum to -1.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.learning.algorithm.perceptron.OnlineMultiPerceptron
OnlineMultiPerceptron.ProportionalUpdate<CategoryType>, OnlineMultiPerceptron.UniformUpdate<CategoryType>
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.OnlineMultiPerceptron
DEFAULT_MIN_MARGIN, minMargin, vectorFactory
 
Constructor Summary
OnlineMultiPerceptron.UniformUpdate()
          Creates a new OnlineMultiPerceptron.UniformUpdate.
OnlineMultiPerceptron.UniformUpdate(double minMargin)
          Creates a new OnlineMultiPerceptron.UniformUpdate with the given minimum margin.
OnlineMultiPerceptron.UniformUpdate(double minMargin, VectorFactory<?> vectorFactory)
          Creates a new OnlineMultiPerceptron.UniformUpdate with the given minimum margin and backing vector factory.
 
Method Summary
 void update(LinearMultiCategorizer<CategoryType> target, InputOutputPair<? extends Vectorizable,CategoryType> example)
          The update method updates an object of ResultType using the given new data of type DataType, using some form of "learning" algorithm.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.OnlineMultiPerceptron
createInitialLearnedObject, getMinMargin, getVectorFactory, setMinMargin, setVectorFactory
 
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
 

Constructor Detail

OnlineMultiPerceptron.UniformUpdate

public OnlineMultiPerceptron.UniformUpdate()
Creates a new OnlineMultiPerceptron.UniformUpdate.


OnlineMultiPerceptron.UniformUpdate

public OnlineMultiPerceptron.UniformUpdate(double minMargin)
Creates a new OnlineMultiPerceptron.UniformUpdate with the given minimum margin.

Parameters:
minMargin - The minimum margin to consider an example correct.

OnlineMultiPerceptron.UniformUpdate

public OnlineMultiPerceptron.UniformUpdate(double minMargin,
                                           VectorFactory<?> vectorFactory)
Creates a new OnlineMultiPerceptron.UniformUpdate with the given minimum margin and backing vector factory.

Parameters:
minMargin - The minimum margin to consider an example correct.
vectorFactory - The vector factory used to create the weight vectors.
Method Detail

update

public void update(LinearMultiCategorizer<CategoryType> target,
                   InputOutputPair<? extends Vectorizable,CategoryType> example)
Description copied from interface: IncrementalLearner
The update method updates an object of ResultType using the given new data of type DataType, using some form of "learning" algorithm.

Specified by:
update in interface IncrementalLearner<InputOutputPair<? extends Vectorizable,CategoryType>,LinearMultiCategorizer<CategoryType>>
Overrides:
update in class OnlineMultiPerceptron<CategoryType>
Parameters:
target - The object to update.
example - The new data for the learning algorithm to use to update the object.