| OneVariableFunctionFitterMWeightedResidualVector Method |
Computes the residual vector from the given data points and solution.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public DoubleVector WeightedResidualVector(
DoubleVector xValues,
DoubleVector yValues,
DoubleVector weights,
DoubleVector solution
)
Public Function WeightedResidualVector (
xValues As DoubleVector,
yValues As DoubleVector,
weights As DoubleVector,
solution As DoubleVector
) As DoubleVector
public:
DoubleVector^ WeightedResidualVector(
DoubleVector^ xValues,
DoubleVector^ yValues,
DoubleVector^ weights,
DoubleVector^ solution
)
member WeightedResidualVector :
xValues : DoubleVector *
yValues : DoubleVector *
weights : DoubleVector *
solution : DoubleVector -> DoubleVector
Parameters
- xValues DoubleVector
- X values of the points.
- yValues DoubleVector
- Y values of the points.
- weights DoubleVector
- Weights used for weighted lease squares fit.
- solution DoubleVector
- The function parameters at the solution.
Return Value
DoubleVector
The residual vector yhat - yValues, where yhat is the predicted yValues values at the solution
for each parameters.
Exceptions Exception | Condition |
---|
InvalidArgumentException |
Thrown if the vectors of parameters and yValues values have different lengths.
|
Remarks
The sum of the squared residuals at the last computed solution is available using
this.Minimizer.FinalResidual.
See Also