gov.sandia.cognition.learning.algorithm.perceptron.kernel
Class Stoptron<InputType>

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<InputType,Boolean,DefaultKernelBinaryCategorizer<InputType>>
              extended by gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineKernelBinaryCategorizerLearner<InputType>
                  extended by gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineBudgetedKernelBinaryCategorizerLearner<InputType>
                      extended by gov.sandia.cognition.learning.algorithm.perceptron.kernel.Stoptron<InputType>
Type Parameters:
InputType - The input type to learn over, which is passed to the kernel function.
All Implemented Interfaces:
BatchAndIncrementalLearner<InputOutputPair<? extends InputType,Boolean>,DefaultKernelBinaryCategorizer<InputType>>, BatchLearner<Collection<? extends InputOutputPair<? extends InputType,Boolean>>,DefaultKernelBinaryCategorizer<InputType>>, IncrementalLearner<InputOutputPair<? extends InputType,Boolean>,DefaultKernelBinaryCategorizer<InputType>>, SupervisedBatchAndIncrementalLearner<InputType,Boolean,DefaultKernelBinaryCategorizer<InputType>>, SupervisedBatchLearner<InputType,Boolean,DefaultKernelBinaryCategorizer<InputType>>, SupervisedIncrementalLearner<InputType,Boolean,DefaultKernelBinaryCategorizer<InputType>>, KernelContainer<InputType>, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author={"Francesco Orabona","Joseph Keshet","Barbara Caputo"},
                      title="Bounded Kernel-Based Online Learning",
                      year=2009,
                      type=Journal,
                      publication="Journal of Machine Learning Research",
                      pages={2643,2666},
                      url="http://portal.acm.org/citation.cfm?id=1755875")
public class Stoptron<InputType>
extends AbstractOnlineBudgetedKernelBinaryCategorizerLearner<InputType>

An online, budgeted, kernel version of the Perceptron algorithm that stops learning once it has reached its budget.

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

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineBudgetedKernelBinaryCategorizerLearner
budget, DEFAULT_BUDGET
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineKernelBinaryCategorizerLearner
kernel
 
Constructor Summary
Stoptron()
          Creates a new Stoptron with default parameters and a null kernel.
Stoptron(Kernel<? super InputType> kernel, int budget)
          Creates a new Stoptron with the given parameters.
 
Method Summary
 void update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean label)
          Updates the target categorizer based on the given input and its associated output.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineBudgetedKernelBinaryCategorizerLearner
getBudget, setBudget
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineKernelBinaryCategorizerLearner
createInitialLearnedObject, getKernel, setKernel, 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.util.CloneableSerializable
clone
 
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
 

Constructor Detail

Stoptron

public Stoptron()
Creates a new Stoptron with default parameters and a null kernel.


Stoptron

public Stoptron(Kernel<? super InputType> kernel,
                int budget)
Creates a new Stoptron with the given parameters.

Parameters:
kernel - The kernel function to use.
budget - The budget for learning. Must be positive.
Method Detail

update

public void update(DefaultKernelBinaryCategorizer<InputType> target,
                   InputType input,
                   boolean label)
Description copied from class: AbstractOnlineKernelBinaryCategorizerLearner
Updates the target categorizer based on the given input and its associated output.

Specified by:
update in class AbstractOnlineKernelBinaryCategorizerLearner<InputType>
Parameters:
target - The target categorizer to update.
input - The input value to learn from.
label - The output value associated with the input.