Class DenseWeightedEvaluation
java.lang.Object
org.apache.commons.math3.fitting.leastsquares.AbstractEvaluation
org.apache.commons.math3.fitting.leastsquares.DenseWeightedEvaluation
- All Implemented Interfaces:
LeastSquaresProblem.Evaluation
Applies a dense weight matrix to an evaluation.
- Since:
- 3.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LeastSquaresProblem.Evaluation
the unweighted evaluationprivate final RealMatrix
reference to the weight square root matrix -
Constructor Summary
ConstructorsConstructorDescriptionDenseWeightedEvaluation
(LeastSquaresProblem.Evaluation unweighted, RealMatrix weightSqrt) Create a weighted evaluation from an unweighted one. -
Method Summary
Modifier and TypeMethodDescriptionGet the weighted Jacobian matrix.getPoint()
Get the abscissa (independent variables) of this evaluation.Get the weighted residuals.Methods inherited from class org.apache.commons.math3.fitting.leastsquares.AbstractEvaluation
getCost, getCovariances, getRMS, getSigma
-
Field Details
-
unweighted
the unweighted evaluation -
weightSqrt
reference to the weight square root matrix
-
-
Constructor Details
-
DenseWeightedEvaluation
DenseWeightedEvaluation(LeastSquaresProblem.Evaluation unweighted, RealMatrix weightSqrt) Create a weighted evaluation from an unweighted one.- Parameters:
unweighted
- the evalutation before weights are appliedweightSqrt
- the matrix square root of the weight matrix
-
-
Method Details
-
getJacobian
Get the weighted Jacobian matrix.- Returns:
- the weighted Jacobian: W1/2 J.
-
getResiduals
Get the weighted residuals. The residual is the difference between the observed (target) values and the model (objective function) value. There is one residual for each element of the vector-valued function. The raw residuals are then multiplied by the square root of the weight matrix.- Returns:
- the weighted residuals: W1/2 K.
-
getPoint
Get the abscissa (independent variables) of this evaluation.- Returns:
- the point provided to
LeastSquaresProblem.evaluate(RealVector)
.
-