gov.sandia.cognition.learning.algorithm.perceptron
Class Ballseptron

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,LinearBinaryCategorizer>
              extended by gov.sandia.cognition.learning.algorithm.perceptron.AbstractOnlineLinearBinaryCategorizerLearner
                  extended by gov.sandia.cognition.learning.algorithm.perceptron.AbstractKernelizableBinaryCategorizerOnlineLearner
                      extended by gov.sandia.cognition.learning.algorithm.perceptron.Ballseptron
All Implemented Interfaces:
BatchAndIncrementalLearner<InputOutputPair<? extends Vectorizable,Boolean>,LinearBinaryCategorizer>, BatchLearner<Collection<? extends InputOutputPair<? extends Vectorizable,Boolean>>,LinearBinaryCategorizer>, IncrementalLearner<InputOutputPair<? extends Vectorizable,Boolean>,LinearBinaryCategorizer>, KernelizableBinaryCategorizerOnlineLearner, SupervisedBatchAndIncrementalLearner<Vectorizable,Boolean,LinearBinaryCategorizer>, SupervisedBatchLearner<Vectorizable,Boolean,LinearBinaryCategorizer>, SupervisedIncrementalLearner<Vectorizable,Boolean,LinearBinaryCategorizer>, VectorFactoryContainer, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author={"Shai Shalev-Shwartz","Yoram Singer"},
                      title="A New Perspective on an Old Perceptron Algorithm",
                      year=2005,
                      type=Conference,
                      publication="Conference on Learning Theory",
                      pages={815,824},
                      url="http://www.springerlink.com/index/hr4hrbyajy0y8a7l.pdf")
public class Ballseptron
extends AbstractKernelizableBinaryCategorizerOnlineLearner

An implementation of the Ballseptron algorithm. It is a Perceptron-style online learning algorithm that involves a margin update. Thus, it has both a linear and kernel form.

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

Field Summary
static double DEFAULT_RADIUS
          The default radius is 0.1.
protected  double radius
          The radius enforced by the algorithm.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractOnlineLinearBinaryCategorizerLearner
vectorFactory
 
Constructor Summary
Ballseptron()
          Creates a new Ballseptron with default parameters.
Ballseptron(double radius)
          Creates a new Ballseptron with the given radius.
 
Method Summary
 double getRadius()
          Gets the radius parameter.
 void setRadius(double radius)
          Sets the radius parameter.
<InputType>
void
update(DefaultKernelBinaryCategorizer<InputType> target, InputType input, boolean label)
          Performs a kernel-based incremental update step on the given object using the given supervised data.
 void update(LinearBinaryCategorizer target, Vector input, boolean label)
          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.perceptron.AbstractKernelizableBinaryCategorizerOnlineLearner
createInitialLearnedObject, createKernelLearner, learn, update, update, update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.perceptron.AbstractOnlineLinearBinaryCategorizerLearner
createInitialLearnedObject, getVectorFactory, setVectorFactory, 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.learning.algorithm.SupervisedIncrementalLearner
update
 
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
createInitialLearnedObject, update, update
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

DEFAULT_RADIUS

public static final double DEFAULT_RADIUS
The default radius is 0.1.

See Also:
Constant Field Values

radius

protected double radius
The radius enforced by the algorithm.

Constructor Detail

Ballseptron

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


Ballseptron

public Ballseptron(double radius)
Creates a new Ballseptron with the given radius.

Parameters:
radius - The radius.
Method Detail

update

public void update(LinearBinaryCategorizer target,
                   Vector input,
                   boolean label)
Description copied from class: AbstractOnlineLinearBinaryCategorizerLearner
The update method updates an object of ResultType using the given a new supervised input-output pair, using some form of "learning" algorithm.

Specified by:
update in class AbstractOnlineLinearBinaryCategorizerLearner
Parameters:
target - The object to update.
input - The supervised input vector to learn from.
label - The supervised output label to learn from.

update

public <InputType> void update(DefaultKernelBinaryCategorizer<InputType> target,
                               InputType input,
                               boolean label)
Description copied from interface: KernelizableBinaryCategorizerOnlineLearner
Performs a kernel-based incremental update step on the given object using the given supervised data.

Type Parameters:
InputType - The input type for supervised learning. Will be passed to the kernel function.
Parameters:
target - The target object to update.
input - The supervised input value.
label - The supervised output value (label).

getRadius

public double getRadius()
Gets the radius parameter.

Returns:
The radius parameter. Must be positive.

setRadius

public void setRadius(double radius)
Sets the radius parameter.

Parameters:
radius - The radius parameter. Must be positive.