Click or drag to resize

QRRegressionCalculation Class

Class QRRegressionCalculation computes linear regression parameters by the method of least squares using a QR decomposition.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreQRRegressionCalculation

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class QRRegressionCalculation : IRegressionCalculation, 
	ICloneable

The QRRegressionCalculation type exposes the following members.

Constructors
 NameDescription
Public methodQRRegressionCalculation Constrcts a QRRegressionCalculation instance with all sizes equal to zero.
Public methodQRRegressionCalculation(DoubleMatrix) Constructs a QRRegressionCalculation instance from the given matrix.
Public methodQRRegressionCalculation(DoubleMatrix, Double) Constructs a QRRegressionCalculation instance from the given matrix. The specified tolerance is used in computing the numerical rank of the matrix.
Top
Properties
 NameDescription
Public propertyCols Gets the number of columns in the matrix.
Public propertyIsGood Returns true if the QR decomposition may be used to solve least squares problems; otherwise false.
Public propertyRank Gets the numerical rank of the matrix.
Public propertyRankAvailable Returns the rank if it was calculated as a byproduct of the parameter calculation.
Public propertyRows Gets the number of rows in the matrix.
Public propertyTolerance Gets and sets the tolerance used for computing the numerical rank of the regression matrix.
Public propertyXTXInv Gets the matrix formed by taking the inverse of the product of the transpose of the regression matrix with itself, if available.
Public propertyXTXInvAvailable Gets a boolean value indicating whether or not the matrix formed by taking the inverse of the product of the transpose of the regression matrix with itself is available.
Top
Methods
 NameDescription
Public methodCalculateParameters(DoubleMatrix, DoubleVector) Calculates the parameters for the regression using a QR decomposition of the regression matrix to solve the least squares problem.
Public methodCalculateParameters(DoubleMatrix, DoubleVector, Boolean) Calculates the parameters for the regression using a QR decomposition of the regression matrix to solve the least squares problem.
Public methodClone Creates a deep copy of this regression calculator instance.
Public methodFactor(DoubleMatrix) Factors a given matrix so that it may be used to solve least squares problems.
Public methodFactor(DoubleMatrix, Double) Factors a given matrix so that it may be used to solve least squares problems. The specified tolerance is used in computing the numerical rank of the matrix.
Public methodFactor(DoubleMatrix, Double, Boolean) Factors a given matrix so that it may be used to solve least squares problems. The specified tolerance is used in computing the numerical rank of the matrix.
Public methodResidualNormSqr Computes the 2-norm squared of the residual vector.
Public methodResidualVector Computes and returns the residual vector.
Public methodSolve Computes the solution to the least squares problem Ax = b.
Top
Remarks
Class QRRegressionCalculation finds the minimal norm solution to the overdetermined linear system:
C#
Ax = b
That is, this class finds the vector x that minimizes the 2-norm of the residual vector Ax - b. Prerequisites on the matrix A are that it has more rows than columns, and is of full rank.
See Also