Click or drag to resize

OneVariableFunctionFitterMWeightedResidualVector Method

Computes the residual vector from the given data points and solution.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public DoubleVector WeightedResidualVector(
	DoubleVector xValues,
	DoubleVector yValues,
	DoubleVector weights,
	DoubleVector solution
)

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
ExceptionCondition
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