Package org.ddogleg.optimization.loss
Class LossIRLS
java.lang.Object
org.ddogleg.optimization.loss.LossWeighted
org.ddogleg.optimization.loss.LossIRLS
- All Implemented Interfaces:
FunctionNtoN
,FunctionNtoS
,LossFunction
,LossFunctionGradient
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionFunction that's called when the weights need to be updated.Fields inherited from class org.ddogleg.optimization.loss.LossWeighted
weights
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
fixate
(double[] residuals) Passes in the current residuals at the start of an iteration.void
setNumberOfFunctions
(int value) Methods inherited from class org.ddogleg.optimization.loss.LossWeighted
getNumberOfFunctions, process, process
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ddogleg.optimization.loss.LossFunction
getNumOfInputsN
Methods inherited from interface org.ddogleg.optimization.loss.LossFunctionGradient
getN
-
Field Details
-
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 interfaceLossFunction
- Specified by:
setNumberOfFunctions
in interfaceLossFunctionGradient
- Overrides:
setNumberOfFunctions
in classLossWeighted
-