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

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer<InputType>
          extended by gov.sandia.cognition.learning.function.categorization.AbstractDiscriminantBinaryCategorizer<InputType>
              extended by gov.sandia.cognition.learning.function.categorization.KernelBinaryCategorizer<InputType,DefaultWeightedValue<InputType>>
                  extended by gov.sandia.cognition.learning.function.categorization.DefaultKernelBinaryCategorizer<InputType>
                      extended by gov.sandia.cognition.learning.algorithm.perceptron.kernel.Forgetron.Result<InputType>
Type Parameters:
InputType - The input type to categorize, which is passed to the kernel function.
All Implemented Interfaces:
Evaluator<InputType,Boolean>, BinaryCategorizer<InputType>, Categorizer<InputType,Boolean>, DiscriminantBinaryCategorizer<InputType>, DiscriminantCategorizer<InputType,Boolean,Double>, ThresholdBinaryCategorizer<InputType>, KernelContainer<InputType>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
Forgetron<InputType>

public static class Forgetron.Result<InputType>
extends DefaultKernelBinaryCategorizer<InputType>

The result object learned by the Forgetron, which extends the DefaultKernelBinaryCategorizer with some additional state information needed in the update step.

See Also:
Serialized Form

Field Summary
protected  long errorCount
          The number of errors that the categorizer has made in the learning step.
protected  double q
          The value of Q for the algorithm.
 
Fields inherited from class gov.sandia.cognition.learning.function.categorization.KernelBinaryCategorizer
bias, DEFAULT_BIAS, examples, kernel
 
Fields inherited from class gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer
BINARY_CATEGORIES
 
Constructor Summary
Forgetron.Result()
          Creates a new Result with a null kernel.
Forgetron.Result(Kernel<? super InputType> kernel)
          Creates a new Result with the given kernel.
 
Method Summary
 long getErrorCount()
          Gets the error count.
protected  double getQ()
          Gets the value Q updated by the algorithm.
protected  void setErrorCount(long errorCount)
          Sets the error count.
protected  void setQ(double q)
          Gets the value Q updated by the algorithm.
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.DefaultKernelBinaryCategorizer
add, get, getExampleCount, remove
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.KernelBinaryCategorizer
evaluateAsDouble, getBias, getExamples, getKernel, getThreshold, setBias, setExamples, setKernel, setThreshold
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.AbstractDiscriminantBinaryCategorizer
evaluate, evaluateWithDiscriminant
 
Methods inherited from class gov.sandia.cognition.learning.function.categorization.AbstractBinaryCategorizer
getCategories
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
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.function.categorization.DiscriminantCategorizer
evaluateWithDiscriminant
 
Methods inherited from interface gov.sandia.cognition.learning.function.categorization.Categorizer
getCategories
 
Methods inherited from interface gov.sandia.cognition.evaluator.Evaluator
evaluate
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

errorCount

protected long errorCount
The number of errors that the categorizer has made in the learning step.


q

protected double q
The value of Q for the algorithm.

Constructor Detail

Forgetron.Result

public Forgetron.Result()
Creates a new Result with a null kernel.


Forgetron.Result

public Forgetron.Result(Kernel<? super InputType> kernel)
Creates a new Result with the given kernel.

Parameters:
kernel - The kernel to use.
Method Detail

getErrorCount

public long getErrorCount()
Gets the error count.

Returns:
The error count.

setErrorCount

protected void setErrorCount(long errorCount)
Sets the error count.

Parameters:
errorCount - The error count.

getQ

protected double getQ()
Gets the value Q updated by the algorithm.

Returns:
The Q value.

setQ

protected void setQ(double q)
Gets the value Q updated by the algorithm.

Parameters:
q - The Q value.