InputType
- Input class for the Evaluator and inputs on the
InputOutputPairs datasetOutputType
- Output class for the Evaluator, outputs on the
InputOutputPairs dataset. Furthermore, the Kernel must be able to
evaluate OutputTypes.public class KernelWeightedRobustRegression<InputType,OutputType> extends AbstractAnytimeSupervisedBatchLearner<InputType,OutputType,Evaluator<? super InputType,? extends OutputType>>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_ITERATIONS
Default maximum number of iterations before stopping
|
static double |
DEFAULT_TOLERANCE
Default tolerance stopping criterion
|
data, keepGoing
maxIterations
DEFAULT_ITERATION, iteration
Constructor and Description |
---|
KernelWeightedRobustRegression(SupervisedBatchLearner<InputType,OutputType,?> iterationLearner,
Kernel<? super OutputType> kernelWeightingFunction)
Creates a new instance of RobustRegression
|
KernelWeightedRobustRegression(SupervisedBatchLearner<InputType,OutputType,?> iterationLearner,
Kernel<? super OutputType> kernelWeightingFunction,
int maxIterations,
double tolerance)
Creates a new instance of RobustRegression
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupAlgorithm()
Called to clean up the learning algorithm's state after learning has
finished.
|
SupervisedBatchLearner<InputType,OutputType,?> |
getIterationLearner()
Getter for iterationLearner
|
Kernel<? super OutputType> |
getKernelWeightingFunction()
Getter for kernelWeightingFunction
|
Evaluator<? super InputType,? extends OutputType> |
getResult()
Gets the current result of the algorithm.
|
double |
getTolerance()
Getter for tolerance
|
protected boolean |
initializeAlgorithm()
Called to initialize the learning algorithm's state based on the
data that is stored in the data field.
|
void |
setIterationLearner(SupervisedBatchLearner<InputType,OutputType,?> iterationLearner) |
void |
setKernelWeightingFunction(Kernel<? super OutputType> kernelWeightingFunction)
Getter for kernelWeightingFunction
|
void |
setLearned(Evaluator<InputType,OutputType> result)
Getter for result
|
void |
setTolerance(double tolerance)
Setter for tolerance
|
protected boolean |
step()
Called to take a single step of the learning algorithm.
|
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stop
getMaxIterations, isResultValid, setMaxIterations
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
learn
clone
getMaxIterations, setMaxIterations
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
isResultValid
public static final int DEFAULT_MAX_ITERATIONS
public static final double DEFAULT_TOLERANCE
public KernelWeightedRobustRegression(SupervisedBatchLearner<InputType,OutputType,?> iterationLearner, Kernel<? super OutputType> kernelWeightingFunction)
iterationLearner
- Internal learning algorithm that computes optimal solutions
given the current weightedData. The iterationLearner should operate on
WeightedInputOutputPairs (we have a hard time enforcing this, as many
learning algorithms operate both on InputOutputPairs and
WeightedInputOutputPairs and their prototype is "? extends InputOutputPair")kernelWeightingFunction
- Kernel function that provides the weighting for the estimate error,
generally the Kernel should weight accurate estimates higher than
inaccurate estimates.public KernelWeightedRobustRegression(SupervisedBatchLearner<InputType,OutputType,?> iterationLearner, Kernel<? super OutputType> kernelWeightingFunction, int maxIterations, double tolerance)
iterationLearner
- Internal learning algorithm that computes optimal solutions
given the current weightedData. The iterationLearner should operate on
WeightedInputOutputPairs (we have a hard time enforcing this, as many
learning algorithms operate both on InputOutputPairs and
WeightedInputOutputPairs and their prototype is "? extends InputOutputPair")kernelWeightingFunction
- Kernel function that provides the weighting for the estimate error,
generally the Kernel should weight accurate estimates higher than
inaccurate estimates.maxIterations
- The maximum number of iterationstolerance
- The maximum tolerance
Tolerance before stopping the algorithmprotected boolean initializeAlgorithm()
AbstractAnytimeBatchLearner
initializeAlgorithm
in class AbstractAnytimeBatchLearner<java.util.Collection<? extends InputOutputPair<? extends InputType,OutputType>>,Evaluator<? super InputType,? extends OutputType>>
protected boolean step()
AbstractAnytimeBatchLearner
step
in class AbstractAnytimeBatchLearner<java.util.Collection<? extends InputOutputPair<? extends InputType,OutputType>>,Evaluator<? super InputType,? extends OutputType>>
protected void cleanupAlgorithm()
AbstractAnytimeBatchLearner
cleanupAlgorithm
in class AbstractAnytimeBatchLearner<java.util.Collection<? extends InputOutputPair<? extends InputType,OutputType>>,Evaluator<? super InputType,? extends OutputType>>
public Kernel<? super OutputType> getKernelWeightingFunction()
public void setKernelWeightingFunction(Kernel<? super OutputType> kernelWeightingFunction)
kernelWeightingFunction
- Kernel function that provides the weighting for the estimate error,
generally the Kernel should weight accurate estimates higher than
innaccurate estimates.public double getTolerance()
public void setTolerance(double tolerance)
tolerance
- Tolerance before stopping the algorithmpublic void setLearned(Evaluator<InputType,OutputType> result)
result
- DecoupledVectorFunction that is being optimizedpublic Evaluator<? super InputType,? extends OutputType> getResult()
AnytimeAlgorithm
public SupervisedBatchLearner<InputType,OutputType,?> getIterationLearner()
public void setIterationLearner(SupervisedBatchLearner<InputType,OutputType,?> iterationLearner)
iterationLearner
- Internal learning algorithm that computes optimal solutions
given the current weightedData. The iterationLearner should operate on
WeightedInputOutputPairs (we have a hard time enforcing this, as many
learning algorithms operate both on InputOutputPairs and
WeightedInputOutputPairs)