gov.sandia.cognition.framework.learning
Class EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType>

java.lang.Object
  extended by gov.sandia.cognition.framework.learning.EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType>
Type Parameters:
InputType - Input type of the embedded Evaluator.
OutputType - Output type of the embedded Evaluator.
LearningDataType - Data type used to create the training set, for example "Vector" or "InputOutputPair", etc.
All Implemented Interfaces:
CognitiveModuleFactoryLearner, CloneableSerializable, Serializable, Cloneable

public class EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType>
extends Object
implements CognitiveModuleFactoryLearner, CloneableSerializable

The EvaluatorBasedCognitiveModuleFactoryLearner class implements a CognitiveModuleFactoryLearner for the EvaluatorBasedCognitiveModuleFactory. It can be used to adapt learning algorithms that learn Evaluator objects to the Cognitive Framework.

Since:
2.0
Author:
Justin Basilico, Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static String DEFAULT_NAME
          Default name for this module
 
Constructor Summary
EvaluatorBasedCognitiveModuleFactoryLearner()
          Creates a new instance of CognitiveModuleFactoryEvaluatorLearner.
EvaluatorBasedCognitiveModuleFactoryLearner(BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<? super InputType,? extends OutputType>> learner, String name, CogxelConverter<InputType> inputConverter, CogxelConverter<OutputType> outputConverter, CogxelConverter<LearningDataType> learningDataConverter)
          Creates a new instance of CognitiveModuleFactoryEvaluatorLearner.
EvaluatorBasedCognitiveModuleFactoryLearner(BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<InputType,OutputType>> learner, String name)
          Creates a new instance of CognitiveModuleFactoryEvaluatorLearner.
EvaluatorBasedCognitiveModuleFactoryLearner(EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType> other)
          Creates a new copy of a of CognitiveModuleFactoryEvaluatorLearner.
 
Method Summary
 EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType> clone()
          Creates a copy of this EvaluatorBasedCognitiveModuleFactoryLearner.
 CogxelConverter<InputType> getInputConverter()
          Gets the CogxelConverter used to convert from a CogxelState to InputType.
 BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<? super InputType,? extends OutputType>> getLearner()
          Gets the learner used to create the Evaluator for the module.
 CogxelConverter<LearningDataType> getLearningDataConverter()
          Gets the CogxelConverter used to convert from a CogxelState to LearningDataType.
 String getName()
          Getter for name
 CogxelConverter<OutputType> getOutputConverter()
          Gets the CogxelConverter used to convert OutputType to a CogxelState.
 EvaluatorBasedCognitiveModuleFactory<InputType,OutputType> learn(CognitiveModel model, Collection<? extends Collection<? extends CognitiveModelInput>> datasets)
          Learns a new EvaluatorBasedCognitiveModuleFactory based on the given existing factory plus the given collection of CognitiveModelInput objects.
 void setInputConverter(CogxelConverter<InputType> inputConverter)
          Sets the CogxelConverter used to convert from a CogxelState to InputType.
 void setLearner(BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<? super InputType,? extends OutputType>> learner)
          Sets the learner used to create the Evaluator for the module.
 void setLearningDataConverter(CogxelConverter<LearningDataType> learningDataConverter)
          Sets the CogxelConverter used to convert from a CogxelState to LearningDataType.
 void setName(String name)
          Setter for name
 void setOutputConverter(CogxelConverter<OutputType> outputConverter)
          Sets the CogxelConverter used to convert OutputType to a CogxelState.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME

public static final String DEFAULT_NAME
Default name for this module

See Also:
Constant Field Values
Constructor Detail

EvaluatorBasedCognitiveModuleFactoryLearner

public EvaluatorBasedCognitiveModuleFactoryLearner()
Creates a new instance of CognitiveModuleFactoryEvaluatorLearner.


EvaluatorBasedCognitiveModuleFactoryLearner

public EvaluatorBasedCognitiveModuleFactoryLearner(BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<InputType,OutputType>> learner,
                                                   String name)
Creates a new instance of CognitiveModuleFactoryEvaluatorLearner.

Parameters:
learner - The learner to use to learn the evaluator.
name - High-level name of the module

EvaluatorBasedCognitiveModuleFactoryLearner

public EvaluatorBasedCognitiveModuleFactoryLearner(BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<? super InputType,? extends OutputType>> learner,
                                                   String name,
                                                   CogxelConverter<InputType> inputConverter,
                                                   CogxelConverter<OutputType> outputConverter,
                                                   CogxelConverter<LearningDataType> learningDataConverter)
Creates a new instance of CognitiveModuleFactoryEvaluatorLearner.

Parameters:
learner - The learner to use to learn the evaluator.
name - High-level name of the module
inputConverter - The CogxelConverter used to convert from a CogxelState to InputType.
outputConverter - The CogxelConverter used to convert OutputType to a CogxelState.
learningDataConverter - The CogxelConverter used to convert from a CogxelState to LearningDataType.

EvaluatorBasedCognitiveModuleFactoryLearner

public EvaluatorBasedCognitiveModuleFactoryLearner(EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType> other)
Creates a new copy of a of CognitiveModuleFactoryEvaluatorLearner.

Parameters:
other - The other CognitiveModuleFactoryEvaluatorLearner to copy.
Method Detail

clone

public EvaluatorBasedCognitiveModuleFactoryLearner<InputType,OutputType,LearningDataType> clone()
Creates a copy of this EvaluatorBasedCognitiveModuleFactoryLearner.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class Object
Returns:
A copy of this EvaluatorBasedCognitiveModuleFactoryLearner.

learn

public EvaluatorBasedCognitiveModuleFactory<InputType,OutputType> learn(CognitiveModel model,
                                                                        Collection<? extends Collection<? extends CognitiveModelInput>> datasets)
Learns a new EvaluatorBasedCognitiveModuleFactory based on the given existing factory plus the given collection of CognitiveModelInput objects.

Specified by:
learn in interface CognitiveModuleFactoryLearner
Parameters:
model - The model to learn the module factory for.
datasets - The datasets to use to learn the module factory.
Returns:
The learned EvaluatorBasedCognitiveModuleFactory.

getLearner

public BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<? super InputType,? extends OutputType>> getLearner()
Gets the learner used to create the Evaluator for the module.

Returns:
The learner used to create the Evaluator for the module.

setLearner

public void setLearner(BatchLearner<? super Collection<LearningDataType>,? extends Evaluator<? super InputType,? extends OutputType>> learner)
Sets the learner used to create the Evaluator for the module.

Parameters:
learner - The learner used to create the Evaluator for the module.

getInputConverter

public CogxelConverter<InputType> getInputConverter()
Gets the CogxelConverter used to convert from a CogxelState to InputType.

Returns:
The CogxelConverter used to convert from a CogxelState to InputType.

setInputConverter

public void setInputConverter(CogxelConverter<InputType> inputConverter)
Sets the CogxelConverter used to convert from a CogxelState to InputType.

Parameters:
inputConverter - The CogxelConverter used to convert from a CogxelState to InputType.

getOutputConverter

public CogxelConverter<OutputType> getOutputConverter()
Gets the CogxelConverter used to convert OutputType to a CogxelState.

Returns:
The CogxelConverter used to convert OutputType to a CogxelState.

setOutputConverter

public void setOutputConverter(CogxelConverter<OutputType> outputConverter)
Sets the CogxelConverter used to convert OutputType to a CogxelState.

Parameters:
outputConverter - The CogxelConverter used to convert OutputType to a CogxelState.

getLearningDataConverter

public CogxelConverter<LearningDataType> getLearningDataConverter()
Gets the CogxelConverter used to convert from a CogxelState to LearningDataType.

Returns:
The CogxelConverter used to convert from a CogxelState to LearningDataType.

setLearningDataConverter

public void setLearningDataConverter(CogxelConverter<LearningDataType> learningDataConverter)
Sets the CogxelConverter used to convert from a CogxelState to LearningDataType.

Parameters:
learningDataConverter - The CogxelConverter used to convert from a CogxelState to LearningDataType.

getName

public String getName()
Getter for name

Returns:
Human-readable name for this module

setName

public void setName(String name)
Setter for name

Parameters:
name - Human-readable name for this module