gov.sandia.cognition.learning.function.categorization
Class WinnerTakeAllCategorizer.Learner<InputType,CategoryType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,Vector>>,? extends Evaluator<? super InputType,? extends Vectorizable>>>
          extended by gov.sandia.cognition.learning.function.categorization.WinnerTakeAllCategorizer.Learner<InputType,CategoryType>
Type Parameters:
InputType - The type of the input data for the learner.
CategoryType - The type of the output categories.
All Implemented Interfaces:
BatchLearner<Collection<? extends InputOutputPair<? extends InputType,CategoryType>>,WinnerTakeAllCategorizer<InputType,CategoryType>>, BatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,Vector>>,? extends Evaluator<? super InputType,? extends Vectorizable>>>, SupervisedBatchLearner<InputType,CategoryType,WinnerTakeAllCategorizer<InputType,CategoryType>>, VectorFactoryContainer, CloneableSerializable, Serializable, Cloneable
Enclosing class:
WinnerTakeAllCategorizer<InputType,CategoryType>

public static class WinnerTakeAllCategorizer.Learner<InputType,CategoryType>
extends AbstractBatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,Vector>>,? extends Evaluator<? super InputType,? extends Vectorizable>>>
implements SupervisedBatchLearner<InputType,CategoryType,WinnerTakeAllCategorizer<InputType,CategoryType>>, VectorFactoryContainer

A learner for the adapter. Makes it so that learning algorithms that produce evaluators whose outputs are vectors to be used for categorization.

See Also:
Serialized Form

Field Summary
protected  VectorFactory<?> vectorFactory
          The vector factory used.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer
learner
 
Constructor Summary
WinnerTakeAllCategorizer.Learner()
          Creates a new learner adapter.
WinnerTakeAllCategorizer.Learner(BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,Vector>>,Evaluator<? super InputType,? extends Vectorizable>> learner)
          Creates a new learner adapter with the given internal learner.
 
Method Summary
 VectorFactory<?> getVectorFactory()
          Gets the vector factory.
 WinnerTakeAllCategorizer<InputType,CategoryType> learn(Collection<? extends InputOutputPair<? extends InputType,CategoryType>> data)
          The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.
 void setVectorFactory(VectorFactory<?> vectorFactory)
          Sets the vector factory.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer
clone, getLearner, setLearner
 
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
 

Field Detail

vectorFactory

protected VectorFactory<?> vectorFactory
The vector factory used.

Constructor Detail

WinnerTakeAllCategorizer.Learner

public WinnerTakeAllCategorizer.Learner()
Creates a new learner adapter.


WinnerTakeAllCategorizer.Learner

public WinnerTakeAllCategorizer.Learner(BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,Vector>>,Evaluator<? super InputType,? extends Vectorizable>> learner)
Creates a new learner adapter with the given internal learner.

Parameters:
learner - The learner to adapt.
Method Detail

learn

public WinnerTakeAllCategorizer<InputType,CategoryType> learn(Collection<? extends InputOutputPair<? extends InputType,CategoryType>> 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 InputOutputPair<? extends InputType,CategoryType>>,WinnerTakeAllCategorizer<InputType,CategoryType>>
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.

getVectorFactory

public VectorFactory<?> getVectorFactory()
Gets the vector factory.

Specified by:
getVectorFactory in interface VectorFactoryContainer
Returns:
The vector factory.

setVectorFactory

public void setVectorFactory(VectorFactory<?> vectorFactory)
Sets the vector factory.

Parameters:
vectorFactory - The vector factory.