Click or drag to resize

WeightedLS Class

Weighted Least Squares (WLS). http://en.wikipedia.org/wiki/Weighted_least_squares#Weighted_least_squares
Inheritance Hierarchy
SystemObject
  FinMath.LeastSquaresAbstractLS
    FinMath.LeastSquaresWeightedLS

Namespace:  FinMath.LeastSquares
Assembly:  FinMath (in FinMath.dll) Version: 2.4.7-0a995bd0ea1854c2c868ec3f8dae606c5777e170
Syntax
C#
[SerializableAttribute]
public class WeightedLS : AbstractLS

The WeightedLS type exposes the following members.

Constructors
  NameDescription
Public methodWeightedLS(Int32)
Initialize new instance of WLS.
Public methodWeightedLS(Matrix, Vector, Vector)
Initialize new instance of WLS. Note: That weights commonly used as INVERTED residuals variance, NOT VARIANCE. Use WeightedLS.VariancesToWeights to robust conversion variance to weight.
Top
Properties
  NameDescription
Public propertyParameters
Vector of regression parameters.
(Inherited from AbstractLS.)
Public propertyStatus
Method Status.
(Inherited from AbstractLS.)
Top
Methods
  NameDescription
Public methodCalculateR2(Matrix, Vector)
Calculate R2 - Coefficient of determination - goodness-of-fit of the OLS regression metric. Method use computed regression parameters. http://en.wikipedia.org/wiki/Coefficient_of_determination
(Inherited from AbstractLS.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEstimate(Matrix)
Estimate regresand values, using computed regression parameters and regressors values. Use this this method for multiple observations.
(Inherited from AbstractLS.)
Public methodEstimate(Vector)
Estimate regresand value, using computed regression parameters and regressors value. Use this this method for single observation.
(Inherited from AbstractLS.)
Public methodEstimateResidual(Vector, Double)
Calculate residuals of estimations, using computed regression parameters, regressors and regressand value. Use this this method for single observation.
(Inherited from AbstractLS.)
Public methodEstimateResiduals(Matrix, Vector)
Calculate residuals of estimations, using computed regression parameters, regressors and regressand values. Use this this method for multiple observations.
(Inherited from AbstractLS.)
Public methodStatic memberFitWLS
Static method, which can be used to simply calculate WLS parameters. Note: That weights commonly used as INVERTED residuals variance, NOT VARIANCE. Use WeightedLS.VariancesToWeights to robust conversion variance to weight.
Public methodForget(Matrix, Vector, Vector)
Update WLS parameters according new observations. It is useful for estimation on sliding window.
Public methodForget(Vector, Double, Double)
Update WLS parameters according new observations. It is useful for estimation on sliding window.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate(Matrix, Vector, Vector)
Update WLS parameters according new observations. It is useful for estimation on sliding window.
Public methodUpdate(Vector, Double, Double)
Update WLS parameters according new observations. It is useful for estimation on sliding window.
Public methodStatic memberVariancesToWeights(Vector)
Static method which transform known residuals variance to weights, Note: We for zero variances we assume average weights.
Public methodStatic memberVariancesToWeights(Vector, Vector)
Static method which transform known residuals variance to weights, Note: We for zero variances we assume average weights.
Public methodStatic memberVariancesToWeights(Vector, Vector, Double)
Static method which transform known residuals variance to weights, Note: We for zero variances we assume average weights.
Top
See Also