gov.sandia.cognition.learning.algorithm
Class InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>>>
          extended by gov.sandia.cognition.learning.algorithm.InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>
Type Parameters:
InputType - The input type of the data to learn on. This is passed into the unsupervised learner for the input transform to create the evaluator that will then produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of the output transformer (and input type of its reverse).
OutputType - The output type of the data to learn on. This is passed into the unsupervised learner for the output transform to create the reversible data converter for mapping the OutputType to the TransformedOutputType, or vice-versa.
All Implemented Interfaces:
BatchLearner<Collection<? extends InputOutputPair<? extends InputType,OutputType>>,CompositeEvaluatorTriple<InputType,TransformedInputType,TransformedOutputType,OutputType>>, BatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>>>, SupervisedBatchLearner<InputType,OutputType,CompositeEvaluatorTriple<InputType,TransformedInputType,TransformedOutputType,OutputType>>, CloneableSerializable, Serializable, Cloneable

public class InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>
extends AbstractBatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>>>
implements SupervisedBatchLearner<InputType,OutputType,CompositeEvaluatorTriple<InputType,TransformedInputType,TransformedOutputType,OutputType>>

An adapter class for performing supervised learning from data where both the input and output have to be transformed before they are passed to the learning algorithm. The typical use-case for this class is to make use of some supervised learning algorithm on data that does not directly fit its input and/or output types. Thus, the data must be transformed before the learner is run on the data. It must also be transformed when the resulting evaluator is applied to new data. Since both the inputs and outputs need to be converted, unsupervised learning algorithms are to be provided to learn those transforms from the collection of inputs and outputs, respectively. While the input learner just needs to be an evaluator to forward-transform the data, the output learner needs to be reversible so that the training labels can be reversed from values that the supervised learner can be trained on. Thus, the forward evaluation is used during training reverse evaluation of the output, while the reverse is used when applying it to new data. The result of this learning adapter is the triple containing the learned input, supervised, and output evaluators, which can be applied to the same data types that the adapter was given in training. Note that this class can also be used in cases where only one side needs to be converted, either by using the static create methods, or by passing in ConstantLearners that contain IdentityEvaluators. Thus, this class can act as a very flexible adapter for many types of supervised learning problems.

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

Field Summary
protected  BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner
          The unsupervised learning algorithm for creating the input transformation.
protected  BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner
          The unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer
learner
 
Constructor Summary
InputOutputTransformedBatchLearner()
          Creates a new, empty InputOutputTransformedBatchLearner.
InputOutputTransformedBatchLearner(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner, BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
          Creates a new InputOutputTransformedBatchLearner with the given learners.
 
Method Summary
 InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType> clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
static
<InputType,TransformedInputType,TransformedOutputType,OutputType>
InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>
create(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner, BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
          Creates a new InputOutputTransformedBatchLearner from the three learners.
static
<InputType,TransformedInputType,TransformedOutputType,OutputType>
InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>
create(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner, ReversibleEvaluator<OutputType,TransformedOutputType,?> outputTransform)
          Creates a new InputOutputTransformedBatchLearner from the unsupervised input transform learner, supervised learners, and output transform.
static
<InputType,TransformedInputType,TransformedOutputType,OutputType>
InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>
create(Evaluator<? super InputType,? extends TransformedInputType> inputTransform, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner, BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
          Creates a new InputOutputTransformedBatchLearner from the input transform, supervised learner, and unsupervised output transform learner.
static
<InputType,TransformedInputType,TransformedOutputType,OutputType>
InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType>
create(Evaluator<? super InputType,? extends TransformedInputType> inputTransform, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner, ReversibleEvaluator<OutputType,TransformedOutputType,?> outputTransform)
          Creates a new InputOutputTransformedBatchLearner from the predefined input and output transforms and the supervised learner.
static
<InputType,TransformedInputType,OutputType>
InputOutputTransformedBatchLearner<InputType,TransformedInputType,OutputType,OutputType>
createInputTransformed(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,OutputType>>,? extends Evaluator<? super TransformedInputType,? extends OutputType>> learner)
          Creates a new InputOutputTransformedBatchLearner from the input and supervised learners, performing no transformation on the output type.
static
<InputType,TransformedInputType,OutputType>
InputOutputTransformedBatchLearner<InputType,TransformedInputType,OutputType,OutputType>
createInputTransformed(Evaluator<? super InputType,? extends TransformedInputType> inputTransform, BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,OutputType>>,? extends Evaluator<? super TransformedInputType,? extends OutputType>> learner)
          Creates a new InputOutputTransformedBatchLearner from the predefined input transform and the supervised learner.
static
<InputType,TransformedOutputType,OutputType>
InputOutputTransformedBatchLearner<InputType,InputType,TransformedOutputType,OutputType>
createOutputTransformed(BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,TransformedOutputType>>,? extends Evaluator<? super InputType,? extends TransformedOutputType>> learner, BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
          Creates a new InputOutputTransformedBatchLearner from the supervised and output learners, performing no transformation on the input type.
static
<InputType,TransformedOutputType,OutputType>
InputOutputTransformedBatchLearner<InputType,InputType,TransformedOutputType,OutputType>
createOutputTransformed(BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,TransformedOutputType>>,? extends Evaluator<? super InputType,? extends TransformedOutputType>> learner, ReversibleEvaluator<OutputType,TransformedOutputType,?> outputTransform)
          Creates a new InputOutputTransformedBatchLearner from the predefined output transforms and the supervised learner.
 BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> getInputLearner()
          Gets the unsupervised learning algorithm for creating the input transformation.
 BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> getOutputLearner()
          Gets the unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
 CompositeEvaluatorTriple<InputType,TransformedInputType,TransformedOutputType,OutputType> learn(Collection<? extends InputOutputPair<? extends InputType,OutputType>> data)
          Learn by first calling the input transformation learner on all the input values and the output transformation on the output values.
 void setInputLearner(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner)
          Sets the unsupervised learning algorithm for creating the input transformation.
 void setOutputLearner(BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
          Gets the unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer
getLearner, setLearner
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputLearner

protected BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner
The unsupervised learning algorithm for creating the input transformation.


outputLearner

protected BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner
The unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.

Constructor Detail

InputOutputTransformedBatchLearner

public InputOutputTransformedBatchLearner()
Creates a new, empty InputOutputTransformedBatchLearner.


InputOutputTransformedBatchLearner

public InputOutputTransformedBatchLearner(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner,
                                          BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner,
                                          BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
Creates a new InputOutputTransformedBatchLearner with the given learners.

Parameters:
inputLearner - The unsupervised learning algorithm for creating the input transformation.
learner - The supervised learner whose input and output are being adapted.
outputLearner - The unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
Method Detail

clone

public InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType> clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractBatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>>>
Returns:
A clone of this object.

learn

public CompositeEvaluatorTriple<InputType,TransformedInputType,TransformedOutputType,OutputType> learn(Collection<? extends InputOutputPair<? extends InputType,OutputType>> data)
Learn by first calling the input transformation learner on all the input values and the output transformation on the output values. After these are created, the adapted supervised data is constructed by applying the learned input transformation to each input and the learned output transformation to each output. The third (middle) learner is then trained on the transformed supervised learning problem.

Specified by:
learn in interface BatchLearner<Collection<? extends InputOutputPair<? extends InputType,OutputType>>,CompositeEvaluatorTriple<InputType,TransformedInputType,TransformedOutputType,OutputType>>
Parameters:
data - The training data.
Returns:
The composite evaluator triple that applies the input transform, the learned function, and then the output transform.

getInputLearner

public BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> getInputLearner()
Gets the unsupervised learning algorithm for creating the input transformation.

Returns:
The input transformation learner.

setInputLearner

public void setInputLearner(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner)
Sets the unsupervised learning algorithm for creating the input transformation.

Parameters:
inputLearner - The input transformation learner.

getOutputLearner

public BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> getOutputLearner()
Gets the unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.

Returns:
The output transformation learner.

setOutputLearner

public void setOutputLearner(BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
Gets the unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.

Parameters:
outputLearner - The output transformation learner.

create

public static <InputType,TransformedInputType,TransformedOutputType,OutputType> InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType> create(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner,
                                                                                                                                                                                           BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner,
                                                                                                                                                                                           BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
Creates a new InputOutputTransformedBatchLearner from the three learners.

Type Parameters:
InputType - The input type of the data to learn on. This is passed into the unsupervised learner for the input transform to create the evaluator that will then produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of the output transformer.
OutputType - The output type of the data to learn on. This is passed into the unsupervised learner for the output transform to create the reversible data converter for mapping the OutputType to the TransformedOutputType to the, or vice-versa.
Parameters:
inputLearner - The unsupervised learning algorithm for creating the input transformation.
learner - The supervised learner whose input and output are being adapted.
outputLearner - The unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
Returns:
A new input-output transformed batch learner.

createInputTransformed

public static <InputType,TransformedInputType,OutputType> InputOutputTransformedBatchLearner<InputType,TransformedInputType,OutputType,OutputType> createInputTransformed(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner,
                                                                                                                                                                          BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,OutputType>>,? extends Evaluator<? super TransformedInputType,? extends OutputType>> learner)
Creates a new InputOutputTransformedBatchLearner from the input and supervised learners, performing no transformation on the output type.

Type Parameters:
InputType - The input type of the data to learn on. This is passed into the unsupervised learner for the input transform to create the evaluator that will then produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
OutputType - The output type of the data to learn on. It will be used as the output values to train the (middle) supervised learner.
Parameters:
inputLearner - The unsupervised learning algorithm for creating the input transformation.
learner - The supervised learner whose input is being adapted.
Returns:
A new input transformed batch learner.

createOutputTransformed

public static <InputType,TransformedOutputType,OutputType> InputOutputTransformedBatchLearner<InputType,InputType,TransformedOutputType,OutputType> createOutputTransformed(BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,TransformedOutputType>>,? extends Evaluator<? super InputType,? extends TransformedOutputType>> learner,
                                                                                                                                                                            BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
Creates a new InputOutputTransformedBatchLearner from the supervised and output learners, performing no transformation on the input type.

Type Parameters:
InputType - The input type of the data to learn on. It will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of of the output transformer.
OutputType - The output type of the data to learn on. This is passed into the unsupervised learner for the output transform to create the reversible data converter for mapping the OutputType to the TransformedOutputType to the, or vice-versa.
Parameters:
learner - The supervised learner whose output is being adapted.
outputLearner - The unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
Returns:
A new output transformed batch learner.

create

public static <InputType,TransformedInputType,TransformedOutputType,OutputType> InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType> create(Evaluator<? super InputType,? extends TransformedInputType> inputTransform,
                                                                                                                                                                                           BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner,
                                                                                                                                                                                           ReversibleEvaluator<OutputType,TransformedOutputType,?> outputTransform)
Creates a new InputOutputTransformedBatchLearner from the predefined input and output transforms and the supervised learner.

Type Parameters:
InputType - The input type of the data to learn on. This is passed into the input transform to produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of the output transformer.
OutputType - The output type of the data to learn on. This is passed into the reversible output data converter for mapping the OutputType to the TransformedOutputType to the, or vice-versa.
Parameters:
inputTransform - The predefined input transformation.
learner - The supervised learner whose input and output are being adapted.
outputTransform - The predefined output transformation.
Returns:
A new input-output transformed batch learner.

createInputTransformed

public static <InputType,TransformedInputType,OutputType> InputOutputTransformedBatchLearner<InputType,TransformedInputType,OutputType,OutputType> createInputTransformed(Evaluator<? super InputType,? extends TransformedInputType> inputTransform,
                                                                                                                                                                          BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,OutputType>>,? extends Evaluator<? super TransformedInputType,? extends OutputType>> learner)
Creates a new InputOutputTransformedBatchLearner from the predefined input transform and the supervised learner. It uses no output transformation.

Type Parameters:
InputType - The input type of the data to learn on. This is passed into the input transform to produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
OutputType - The output type of the data to learn on. It will be used as the output values to train the (middle) supervised learner.
Parameters:
inputTransform - The predefined input transformation.
learner - The supervised learner whose input and output are being adapted.
Returns:
A new input transformed batch learner.

createOutputTransformed

public static <InputType,TransformedOutputType,OutputType> InputOutputTransformedBatchLearner<InputType,InputType,TransformedOutputType,OutputType> createOutputTransformed(BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType,TransformedOutputType>>,? extends Evaluator<? super InputType,? extends TransformedOutputType>> learner,
                                                                                                                                                                            ReversibleEvaluator<OutputType,TransformedOutputType,?> outputTransform)
Creates a new InputOutputTransformedBatchLearner from the predefined output transforms and the supervised learner. It uses no input transformation.

Type Parameters:
InputType - The input type of the data to learn on. It will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of of the output transformer.
OutputType - The output type of the data to learn on. This is passed into the reversible output data converter for mapping the OutputType to the TransformedOutputType to the, or vice-versa.
Parameters:
learner - The supervised learner whose input and output are being adapted.
outputTransform - The predefined output transformation.
Returns:
A new output transformed batch learner.

create

public static <InputType,TransformedInputType,TransformedOutputType,OutputType> InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType> create(BatchLearner<? super Collection<? extends InputType>,? extends Evaluator<? super InputType,? extends TransformedInputType>> inputLearner,
                                                                                                                                                                                           BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner,
                                                                                                                                                                                           ReversibleEvaluator<OutputType,TransformedOutputType,?> outputTransform)
Creates a new InputOutputTransformedBatchLearner from the unsupervised input transform learner, supervised learners, and output transform.

Type Parameters:
InputType - The input type of the data to learn on. This is passed into the unsupervised learner for the input transform to create the evaluator that will then produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of the output transformer.
OutputType - The output type of the data to learn on. This is passed into the reversible output data converter for mapping the OutputType to the TransformedOutputType to the, or vice-versa.
Parameters:
inputLearner - The unsupervised learning algorithm for creating the input transformation.
learner - The supervised learner whose input and output are being adapted.
outputTransform - The predefined output transformation.
Returns:
A new input-output transformed batch learner.

create

public static <InputType,TransformedInputType,TransformedOutputType,OutputType> InputOutputTransformedBatchLearner<InputType,TransformedInputType,TransformedOutputType,OutputType> create(Evaluator<? super InputType,? extends TransformedInputType> inputTransform,
                                                                                                                                                                                           BatchLearner<? super Collection<? extends InputOutputPair<? extends TransformedInputType,TransformedOutputType>>,? extends Evaluator<? super TransformedInputType,? extends TransformedOutputType>> learner,
                                                                                                                                                                                           BatchLearner<? super Collection<? extends OutputType>,? extends ReversibleEvaluator<OutputType,TransformedOutputType,?>> outputLearner)
Creates a new InputOutputTransformedBatchLearner from the input transform, supervised learner, and unsupervised output transform learner.

Type Parameters:
InputType - The input type of the data to learn on. This is passed into the input transform to produce the TransformedInputType.
TransformedInputType - The output type of the input transformer, which will be used as the input values to train the (middle) supervised learner.
TransformedOutputType - The input type of the output transformer, which will be used as the output values to train the (middle) supervised learner. It will be the output type of of the output transformer.
OutputType - The output type of the data to learn on. This is passed into the unsupervised learner for the output transform to create the reversible data converter for mapping the OutputType to the TransformedOutputType to the, or vice-versa.
Parameters:
inputTransform - The predefined input transformation.
learner - The supervised learner whose input and output are being adapted.
outputLearner - The unsupervised learning algorithm for creating the output transformation, which must be reversible for evaluation.
Returns:
A new input-output transformed batch learner.