WeightFunctions.GetHuberWeightVectorFromErrors Method

Definition

Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

GetHuberWeightVectorFromErrors(Vector<Double>) Returns a weight vector corresponding to the supplied error values using Huber's M-estimator.
GetHuberWeightVectorFromErrors(Vector<Double>, Double) Returns a weight vector corresponding to the supplied error values using Huber's M-estimator.

GetHuberWeightVectorFromErrors(Vector<Double>)

Returns a weight vector corresponding to the supplied error values using Huber's M-estimator.
C#
public static Vector<double> GetHuberWeightVectorFromErrors(
	Vector<double> errors
)

Parameters

errors  Vector<Double>
A vector containing the errors for each observation.

Return Value

Vector<Double>
A vector containing the weights corresponding to the specified error values.

Remarks

This method uses Huber's M-estimator. The tuning constant is 1.345 times the standard deviation of the errors.

GetHuberWeightVectorFromErrors(Vector<Double>, Double)

Returns a weight vector corresponding to the supplied error values using Huber's M-estimator.
C#
public static Vector<double> GetHuberWeightVectorFromErrors(
	Vector<double> errors,
	double tuningConstant
)

Parameters

errors  Vector<Double>
A vector containing the errors for each observation.
tuningConstant  Double
A tuning constant proportional to the largest error that can have the maximum weight.

Return Value

Vector<Double>
A vector containing the weights corresponding to the specified error values.

See Also