InputType
- Input class to map onto the Output classOutputType
- Output of the Evaluator@PublicationReference(author="Andrew W. Moore", title="Instance-based learning (aka Case-based or Memory-based or non-parametric)", type=WebPage, year=2006, url="http://www.autonlab.org/tutorials/mbl.html") public class LocallyWeightedFunction<InputType,OutputType> extends java.lang.Object implements Evaluator<InputType,OutputType>
KernelWeightedRobustRegression
Modifier and Type | Class and Description |
---|---|
static class |
LocallyWeightedFunction.Learner<InputType,OutputType>
Learning algorithm for creating LocallyWeightedFunctions.
|
Constructor and Description |
---|
LocallyWeightedFunction(Kernel<? super InputType> kernel,
java.util.Collection<? extends InputOutputPair<? extends InputType,OutputType>> rawData,
SupervisedBatchLearner<InputType,OutputType,?> learner)
Evaluator that implements the concept of LocallyWeightedLearning.
|
Modifier and Type | Method and Description |
---|---|
OutputType |
evaluate(InputType input)
This function re-weights the dataset according to the Kernel value
between the input and each input in the dataset.
|
Kernel<? super InputType> |
getKernel()
Getter for kernel
|
SupervisedBatchLearner<InputType,OutputType,?> |
getLearner()
Getter for learner
|
Evaluator<? super InputType,? extends OutputType> |
getLocalApproximator()
Getter for localApproximator
|
void |
setKernel(Kernel<? super InputType> kernel)
Setter for kernel
|
void |
setLearner(SupervisedBatchLearner<InputType,OutputType,?> learner)
Setter for learner
|
void |
setLocalApproximator(Evaluator<? super InputType,? extends OutputType> localApproximator)
Setter for localApproximator
|
public LocallyWeightedFunction(Kernel<? super InputType> kernel, java.util.Collection<? extends InputOutputPair<? extends InputType,OutputType>> rawData, SupervisedBatchLearner<InputType,OutputType,?> learner)
kernel
- Kernel that provides the weights between an input and each sample
in the input datasetrawData
- Original (weighted) datasetlearner
- 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.public Kernel<? super InputType> getKernel()
public void setKernel(Kernel<? super InputType> kernel)
kernel
- Kernel that provides the weights between an input and each sample
in the input datasetpublic SupervisedBatchLearner<InputType,OutputType,?> getLearner()
public void setLearner(SupervisedBatchLearner<InputType,OutputType,?> learner)
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.public OutputType evaluate(InputType input)
evaluate
in interface Evaluator<InputType,OutputType>
input
- Input to create a local approximator for, using the Kernel to weight
the original datasetpublic Evaluator<? super InputType,? extends OutputType> getLocalApproximator()
public void setLocalApproximator(Evaluator<? super InputType,? extends OutputType> localApproximator)
localApproximator
- Dataset containing the weights in response to an evaluate() call. The
weights in this dataset will be a product of the original dataset
weights times the weights from the Kernel response to the given input
to the evaluate() method call.