NMath Reference Guide

## Double |

Abstract base class for least squares weighting functions used in the
Iteratively Reweighted Least Squares algorithm.

Inheritance Hierarchy

SystemObject

CenterSpace.NMath.CoreDoubleLeastSqWeightingFunction

CenterSpace.NMath.CoreDoubleBisquareWeightingFunction

CenterSpace.NMath.CoreDoubleFairWeightingFunction

CenterSpace.NMath.CoreDoubleLeastSqWeightingFunction

CenterSpace.NMath.CoreDoubleBisquareWeightingFunction

CenterSpace.NMath.CoreDoubleFairWeightingFunction

Syntax

The DoubleLeastSqWeightingFunction type exposes the following members.

Constructors

Name | Description | |
---|---|---|

DoubleLeastSqWeightingFunction | Constructs an empty DoubleLeastSqWeighting instance. Behavior is undefined unitil the Initialize method is called. | |

DoubleLeastSqWeightingFunction(Double) | Constructs DoubleLeastSqWeightingFunction instance with the specified tuning constant. | |

DoubleLeastSqWeightingFunction(DoubleLeastSqWeightingFunction) | Copy constructor. Creates an instance of DoubleLeastSqWeightingFunction that is a deep copy of other. | |

DoubleLeastSqWeightingFunction(DoubleMatrix) | Constructs a DoubleLeastSqWeighting instance for the given least square matrix and intercept option. |

Properties

Name | Description | |
---|---|---|

TuningConstant | Gets and sets the tuning constant. |

Methods

Name | Description | |
---|---|---|

AdjustedResiduals | Returns a vector of adjusted residuals for the weighted least squares problem: Ax = b. | |

Clone | Creates a deep copy of this weighting. | |

GetWeights | Computes weights from residuals. | |

Initialize | Performs initialization of the weighting function based on the matrix A in the weighted least squares problem: Ax - b. | |

MedianAbsDeviation | 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. |

Fields

Name | Description | |
---|---|---|

adjFactor_ | 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'. | |

cols_ | Number of columns in the matrix A in the least squares problem. Ax = b. | |

rows_ | Number of rows in the matrix A in the least squares problem. Ax = b. | |

tuningConstant_ | Tuning constant used in the weighting function. Implementing classes should provide this value. |

Remarks

Consider a least square problem of the form
Ax = b
that is is to be solved using iteratively Reweighted least squares.
Typical weighting functions used in iteratively Reweighted least squares
are a function of the residuals from the previous iteration which have
been adjusted. The base class DoubleLeastSqWeightingFunction
provides methods for calculating the adjusted residual from the matrix
A and actual residuals according to the following formula:
adjustedResiduals = residuals / (tuningConstant*s*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'.
s is an estimate of the standard deviation of the error term given by:
s = MAD / 0.6745
where MAD is the median absolute deviation of the residuals from
their median. The constant 0.6745 makes the estimate unbiased for the
normal distribution.
tuningConstant is a tuning constant by which the residuals are divided before
computing weights. Decreasing the tuning constant increases the downweight
assigned to large residuals and increasing the tuning constant decreases
the downweight assigned to large residuals.

See Also