/** * Creates a new instance of RobustRegression * @param 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") * @param kernelWeightingFunction * Kernel function that provides the weighting for the estimate error, * generally the Kernel should weight accurate estimates higher than * inaccurate estimates. * @param maxIterations The maximum number of iterations * @param tolerance The maximum tolerance * Tolerance before stopping the algorithm */ public KernelWeightedRobustRegression( SupervisedBatchLearner<InputType, OutputType, ?> iterationLearner, Kernel<? super OutputType> kernelWeightingFunction, int maxIterations, double tolerance ) { super( maxIterations ); this.setLearned( null ); this.setTolerance( tolerance ); this.setKernelWeightingFunction( kernelWeightingFunction ); this.setIterationLearner( iterationLearner ); }
protected boolean step() { // Compute the learner based on the current weighting of the samples this.result = this.iterationLearner.learn( this.weightedData ); // Update the weight set using the result function and the Kernel // and track the how much the weights have changed double change = this.updateWeights( this.result ); // If the weights have stabilized, then we're done. return (change > this.tolerance); }
protected boolean step() { // Compute the learner based on the current weighting of the samples this.result = this.iterationLearner.learn( this.weightedData ); // Update the weight set using the result function and the Kernel // and track the how much the weights have changed double change = this.updateWeights( this.result ); // If the weights have stabilized, then we're done. return (change > this.tolerance); }
/** * Creates a new instance of RobustRegression * @param 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") * @param kernelWeightingFunction * Kernel function that provides the weighting for the estimate error, * generally the Kernel should weight accurate estimates higher than * inaccurate estimates. * @param maxIterations The maximum number of iterations * @param tolerance The maximum tolerance * Tolerance before stopping the algorithm */ public KernelWeightedRobustRegression( SupervisedBatchLearner<InputType, OutputType, ?> iterationLearner, Kernel<? super OutputType> kernelWeightingFunction, int maxIterations, double tolerance ) { super( maxIterations ); this.setLearned( null ); this.setTolerance( tolerance ); this.setKernelWeightingFunction( kernelWeightingFunction ); this.setIterationLearner( iterationLearner ); }
protected boolean step() { // Compute the learner based on the current weighting of the samples this.result = this.iterationLearner.learn( this.weightedData ); // Update the weight set using the result function and the Kernel // and track the how much the weights have changed double change = this.updateWeights( this.result ); // If the weights have stabilized, then we're done. return (change > this.tolerance); }
/** * Creates a new instance of RobustRegression * @param 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") * @param kernelWeightingFunction * Kernel function that provides the weighting for the estimate error, * generally the Kernel should weight accurate estimates higher than * inaccurate estimates. * @param maxIterations The maximum number of iterations * @param tolerance The maximum tolerance * Tolerance before stopping the algorithm */ public KernelWeightedRobustRegression( SupervisedBatchLearner<InputType, OutputType, ?> iterationLearner, Kernel<? super OutputType> kernelWeightingFunction, int maxIterations, double tolerance ) { super( maxIterations ); this.setLearned( null ); this.setTolerance( tolerance ); this.setKernelWeightingFunction( kernelWeightingFunction ); this.setIterationLearner( iterationLearner ); }