gov.sandia.cognition.learning.algorithm.regression
Class LocallyWeightedFunction.Learner<InputType,OutputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.regression.LocallyWeightedFunction.Learner<InputType,OutputType>
Type Parameters:
InputType - Input class to map onto the Output class
OutputType - Output of the Evaluator
All Implemented Interfaces:
BatchLearner<Collection<? extends InputOutputPair<? extends InputType,OutputType>>,LocallyWeightedFunction<? super InputType,OutputType>>, SupervisedBatchLearner<InputType,OutputType,LocallyWeightedFunction<? super InputType,OutputType>>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
LocallyWeightedFunction<InputType,OutputType>

public static class LocallyWeightedFunction.Learner<InputType,OutputType>
extends AbstractCloneableSerializable
implements SupervisedBatchLearner<InputType,OutputType,LocallyWeightedFunction<? super InputType,OutputType>>

Learning algorithm for creating LocallyWeightedFunctions. This is essentially just a pass through, as no learning takes place, but a model is fitted to the data about each point on an evaluate() call

See Also:
Serialized Form

Constructor Summary
LocallyWeightedFunction.Learner(Kernel<? super InputType> kernel, SupervisedBatchLearner<InputType,OutputType,?> learner)
          Creates a new instance of LocallyWeightedFunction
 
Method Summary
 Kernel<? super InputType> getKernel()
          Getter for kernel
 SupervisedBatchLearner<InputType,OutputType,?> getLearner()
          Getter for learner
 LocallyWeightedFunction<InputType,OutputType> learn(Collection<? extends InputOutputPair<? extends InputType,OutputType>> data)
          The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.
 void setKernel(Kernel<? super InputType> kernel)
          Setter for kernel
 void setLearner(SupervisedBatchLearner<InputType,OutputType,?> learner)
          Setter for learner
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
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
 

Constructor Detail

LocallyWeightedFunction.Learner

public LocallyWeightedFunction.Learner(Kernel<? super InputType> kernel,
                                       SupervisedBatchLearner<InputType,OutputType,?> learner)
Creates a new instance of LocallyWeightedFunction

Parameters:
kernel - Kernel that provides the weights between an input and each sample in the input dataset
learner - Learner that takes the Collection of WeightedInputOutputPairs from the Kernel reweighting and creates a local function approximation at the given input. I would strongly recommend using fast or closed-form learners for this.
Method Detail

learn

public LocallyWeightedFunction<InputType,OutputType> learn(Collection<? extends InputOutputPair<? extends InputType,OutputType>> 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,OutputType>>,LocallyWeightedFunction<? super InputType,OutputType>>
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.

getKernel

public Kernel<? super InputType> getKernel()
Getter for kernel

Returns:
Kernel that provides the weights between an input and each sample in the input dataset

setKernel

public void setKernel(Kernel<? super InputType> kernel)
Setter for kernel

Parameters:
kernel - Kernel that provides the weights between an input and each sample in the input dataset

getLearner

public SupervisedBatchLearner<InputType,OutputType,?> getLearner()
Getter for learner

Returns:
Learner that takes the Collection of WeightedInputOutputPairs from the Kernel reweighting and creates a local function approximation at the given input. I would strongly recommend using fast or closed-form learners for this.

setLearner

public void setLearner(SupervisedBatchLearner<InputType,OutputType,?> learner)
Setter for learner

Parameters:
learner -