gov.sandia.cognition.learning.algorithm.perceptron.kernel
Class AbstractOnlineBudgetedKernelBinaryCategorizerLearner<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>
Type Parameters:
InputType - The type of input passed to the kernel to do learning over.
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
Direct Known Subclasses:
Forgetron, Forgetron.Basic, OnlineKernelRandomizedBudgetPerceptron, RemoveOldestKernelPerceptron, Stoptron

public abstract class AbstractOnlineBudgetedKernelBinaryCategorizerLearner<InputType>
extends AbstractOnlineKernelBinaryCategorizerLearner<InputType>

An abstract implementation of the BudgetedKernelBinaryCategorizerLearner for online learners.

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

Field Summary
protected  int budget
          The budget of the number of examples to keep.
static int DEFAULT_BUDGET
          The default budget is 100.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineKernelBinaryCategorizerLearner
kernel
 
Constructor Summary
AbstractOnlineBudgetedKernelBinaryCategorizerLearner()
          Creates a new AbstractOnlineBudgetedKernelBinaryCategorizerLearner with a null kernel and default budget.
AbstractOnlineBudgetedKernelBinaryCategorizerLearner(Kernel<? super InputType> kernel, int budget)
          Creates a new AbstractOnlineBudgetedKernelBinaryCategorizerLearner with the given parameters.
 
Method Summary
 int getBudget()
          Gets the budget.
 void setBudget(int budget)
          Sets the budget.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.kernel.AbstractOnlineKernelBinaryCategorizerLearner
createInitialLearnedObject, getKernel, setKernel, update, 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
 

Field Detail

DEFAULT_BUDGET

public static final int DEFAULT_BUDGET
The default budget is 100.

See Also:
Constant Field Values

budget

protected int budget
The budget of the number of examples to keep. Must be positive.

Constructor Detail

AbstractOnlineBudgetedKernelBinaryCategorizerLearner

public AbstractOnlineBudgetedKernelBinaryCategorizerLearner()
Creates a new AbstractOnlineBudgetedKernelBinaryCategorizerLearner with a null kernel and default budget.


AbstractOnlineBudgetedKernelBinaryCategorizerLearner

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

Parameters:
kernel - The kernel function to use.
budget - The budget of examples. Must be positive.
Method Detail

getBudget

public int getBudget()
Gets the budget. No more than this number of examples will be used in the resulting kernel categorizer.

Returns:
The budget. Must be positive.

setBudget

public void setBudget(int budget)
Sets the budget. No more than this number of examples will be used in the resulting kernel categorizer.

Parameters:
budget - The budget. Must be positive.