Class LossIRLS

java.lang.Object
org.ddogleg.optimization.loss.LossWeighted
org.ddogleg.optimization.loss.LossIRLS
All Implemented Interfaces:
FunctionNtoN, FunctionNtoS, LossFunction, LossFunctionGradient

public class LossIRLS extends LossWeighted
Iteratively Reweighted Least-Squares (IRLS) allows the weights to be recomputed every iteration. At the start of an internation the weights are computed and saved. This is to ensure the cost function doesn't change as the solver is trying to optimise and it needs to back step.
  • Field Details

    • computeOp

      public LossIRLS.ComputeWeights computeOp
      Function that's called when the weights need to be updated. Must be specified.
  • Constructor Details

    • LossIRLS

      public LossIRLS()
  • Method Details

    • fixate

      public boolean fixate(double[] residuals)
      Description copied from interface: LossFunction
      Passes in the current residuals at the start of an iteration. If a loss function is dynamically computed and conditional on the residuals, here's where it should be done
      Returns:
      true if the loss function has changed and the cost needs to be recomputed.
    • setNumberOfFunctions

      public void setNumberOfFunctions(int value)
      Specified by:
      setNumberOfFunctions in interface LossFunction
      Specified by:
      setNumberOfFunctions in interface LossFunctionGradient
      Overrides:
      setNumberOfFunctions in class LossWeighted