gov.sandia.cognition.learning.function.vector
Class GaussianContextRecognizer.Learner

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
          extended by gov.sandia.cognition.algorithm.AnytimeAlgorithmWrapper<GaussianContextRecognizer,AnytimeBatchLearner<Collection<? extends Vector>,Collection<GaussianCluster>>>
              extended by gov.sandia.cognition.learning.function.vector.GaussianContextRecognizer.Learner
All Implemented Interfaces:
AnytimeAlgorithm<GaussianContextRecognizer>, IterativeAlgorithm, IterativeAlgorithmListener, MeasurablePerformanceAlgorithm, StoppableAlgorithm, AnytimeBatchLearner<Collection<? extends Vector>,GaussianContextRecognizer>, BatchLearner<Collection<? extends Vector>,GaussianContextRecognizer>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
GaussianContextRecognizer

public static class GaussianContextRecognizer.Learner
extends AnytimeAlgorithmWrapper<GaussianContextRecognizer,AnytimeBatchLearner<Collection<? extends Vector>,Collection<GaussianCluster>>>
implements AnytimeBatchLearner<Collection<? extends Vector>,GaussianContextRecognizer>, MeasurablePerformanceAlgorithm

Creates a GaussianContextRecognizer from a Dataset using a BatchClusterer

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
DEFAULT_ITERATION, iteration
 
Constructor Summary
GaussianContextRecognizer.Learner()
          Creates a new Learner.
GaussianContextRecognizer.Learner(KMeansClusterer<Vector,GaussianCluster> algorithm)
          Creates a new instance of Learner
 
Method Summary
 Collection<? extends Vector> getData()
          Gets the data to use for learning.
 boolean getKeepGoing()
          Gets the keep going value, which indicates if the algorithm should continue on to another step.
 NamedValue<? extends Number> getPerformance()
          Gets the name-value pair that describes the current performance of the algorithm.
 GaussianContextRecognizer getResult()
          Gets the current result of the algorithm.
 GaussianContextRecognizer learn(Collection<? extends Vector> data)
          The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.
 
Methods inherited from class gov.sandia.cognition.algorithm.AnytimeAlgorithmWrapper
algorithmEnded, algorithmStarted, clone, getAlgorithm, getIteration, getMaxIterations, isResultValid, readResolve, setAlgorithm, setMaxIterations, stepEnded, stepStarted, stop
 
Methods inherited from class gov.sandia.cognition.algorithm.AbstractIterativeAlgorithm
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.algorithm.AnytimeAlgorithm
getMaxIterations, setMaxIterations
 
Methods inherited from interface gov.sandia.cognition.algorithm.IterativeAlgorithm
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
 
Methods inherited from interface gov.sandia.cognition.algorithm.StoppableAlgorithm
isResultValid, stop
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

GaussianContextRecognizer.Learner

public GaussianContextRecognizer.Learner()
Creates a new Learner.


GaussianContextRecognizer.Learner

public GaussianContextRecognizer.Learner(KMeansClusterer<Vector,GaussianCluster> algorithm)
Creates a new instance of Learner

Parameters:
algorithm - Clustering algorithm to create the GaussianContextRecognizer from
Method Detail

learn

public GaussianContextRecognizer learn(Collection<? extends Vector> data)
Description copied from interface: BatchLearner
The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.

Specified by:
learn in interface BatchLearner<Collection<? extends Vector>,GaussianContextRecognizer>
Parameters:
data - The data that the learning algorithm will use to create an object of ResultType.
Returns:
The object that is created based on the given data using the learning algorithm.

getResult

public GaussianContextRecognizer getResult()
Description copied from interface: AnytimeAlgorithm
Gets the current result of the algorithm.

Specified by:
getResult in interface AnytimeAlgorithm<GaussianContextRecognizer>
Returns:
Current result of the algorithm.

getPerformance

public NamedValue<? extends Number> getPerformance()
Description copied from interface: MeasurablePerformanceAlgorithm
Gets the name-value pair that describes the current performance of the algorithm. For most algorithms, this is the value that they are attempting to optimize.

Specified by:
getPerformance in interface MeasurablePerformanceAlgorithm
Returns:
The name-value pair that describes the current performance of the algorithm.

getKeepGoing

public boolean getKeepGoing()
Description copied from interface: AnytimeBatchLearner
Gets the keep going value, which indicates if the algorithm should continue on to another step.

Specified by:
getKeepGoing in interface AnytimeBatchLearner<Collection<? extends Vector>,GaussianContextRecognizer>
Returns:
The keep going value.

getData

public Collection<? extends Vector> getData()
Description copied from interface: AnytimeBatchLearner
Gets the data to use for learning. This is set when learning starts and then cleared out once learning is finished.

Specified by:
getData in interface AnytimeBatchLearner<Collection<? extends Vector>,GaussianContextRecognizer>
Returns:
The data to use for learning.