Click or drag to resize

DoubleFairWeightingFunction Class

Class DoubleFairWeightingFunction implements the fair weighting function for Iteratively Reweighted Least Squares (IRLS).
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreDoubleLeastSqWeightingFunction
    CenterSpace.NMath.CoreDoubleFairWeightingFunction

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class DoubleFairWeightingFunction : DoubleLeastSqWeightingFunction

The DoubleFairWeightingFunction type exposes the following members.

Constructors
 NameDescription
Public methodDoubleFairWeightingFunction Constructs an instance of DoubleFairWeightingFunction with the default tuning factor.
Public methodDoubleFairWeightingFunction(Double) Constructs an instance of DoubleFairWeightingFunction with the given tuning factor.
Protected methodDoubleFairWeightingFunction(DoubleFairWeightingFunction) Copy constructor. Creates an instance of DoubleFairWeightingFunction that is a deep copy of other.
Public methodDoubleFairWeightingFunction(DoubleMatrix) Constructs an instance of DoubleFairWeightingFunction for the given matrix with the default tuning factor.
Public methodDoubleFairWeightingFunction(DoubleMatrix, Double) Constructs a DoubleFairWeightingFunction for the specified matrx and tuning factor.
Top
Properties
 NameDescription
Public propertyTuningConstant Gets and sets the tuning constant.
(Inherited from DoubleLeastSqWeightingFunction)
Top
Methods
 NameDescription
Public methodAdjustedResiduals Returns a vector of adjusted residuals for the weighted least squares problem: Ax = b.
(Inherited from DoubleLeastSqWeightingFunction)
Public methodClone Creates a deep copy of this weighting.
(Overrides DoubleLeastSqWeightingFunctionClone)
Public methodGetWeights Computes the fair weights for the residuals using the formula: w(r) = 1 / (1 + |r|). Here r is the adjusted redisuals from the AdjustedResidual function of the base class DoubleLeastSqWeightingFunction.
(Overrides DoubleLeastSqWeightingFunctionGetWeights(DoubleVector, DoubleVector))
Public methodInitialize Performs initialization of the weighting function based on the matrix A in the weighted least squares problem: Ax - b.
(Inherited from DoubleLeastSqWeightingFunction)
Public methodMedianAbsDeviation Returns the Mean Absolute Deviation of a vector of values. The mean absolute deviation is an estimate of the standard deviation of the vector of residuals normalized to make the estimate unbiased for the normal distribution.
(Inherited from DoubleLeastSqWeightingFunction)
Top
Fields
 NameDescription
Protected fieldadjFactor_ Adjustment factor used in computing the adjusted residuals. It is given by the formula: 1.0 / sqrt(1 - h). Where, h is the vector of leverage values. The leverage values are the main diagonal of the hat matrix H = A((A'A)^-1)A'.
(Inherited from DoubleLeastSqWeightingFunction)
Protected fieldcols_ Number of columns in the matrix A in the least squares problem. Ax = b.
(Inherited from DoubleLeastSqWeightingFunction)
Public fieldStatic memberDEFAULT_TUNING_FACTOR Default value for the fair weighting tuning factor. If the response is normally distributed, the default tuning factor gives coefficient estimates that are approximately 95% as statistically efficient as the ordinary least squares estimates.
Protected fieldrows_ Number of rows in the matrix A in the least squares problem. Ax = b.
(Inherited from DoubleLeastSqWeightingFunction)
Protected fieldtuningConstant_ Tuning constant used in the weighting function. Implementing classes should provide this value.
(Inherited from DoubleLeastSqWeightingFunction)
Top
Remarks
Applies the fair weighting formula to a set of adjusted residuals.
See Also