Click or drag to resize

SVDRegressionCalculation Class

Class SVDRegressionCalculation computes linear regression parameters by the method of least squares using a singular value decomposition.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreSVDRegressionCalculation

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

The SVDRegressionCalculation type exposes the following members.

Constructors
  NameDescription
Public methodSVDRegressionCalculation
Constructs an SVDRegressionCalculation instance with all sizes equal to zero.
Public methodSVDRegressionCalculation(DoubleMatrix)
Constructs an SVDRegressionCalculation instance from the given matrix.
Public methodSVDRegressionCalculation(DoubleMatrix, Double)
Constructs a SVDRegressionCalculation 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 propertyFail
Gets the status of the singular value decomposition.
Public propertyIsGood
Returns true if the singular value 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 for computing the numerical rank and SVD tuncation. In truncation all singular values less than Tolerance are set to zero and solutions will be computed using the truncated SVD. If the Tolerance is set to 0 no truncation will be performed. The default tolerance is 0, i.e. no truncation.
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 indicating whether or not the matrix formed by taking the inverse of the product of the transpose of the regression matrix with itself is avaialble as part of the decomposition.
Top
Methods
  NameDescription
Public methodCalculateParameters(DoubleMatrix, DoubleVector)
Calculates the parameters for the regression using a singular value decomposition of the regression matrix to solve the least squares problem.
Public methodCalculateParameters(DoubleMatrix, DoubleVector, Boolean)
Calculates the parameters for the regression using a singular value 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 methodOnSerializing
Checks for soln_ to be null, instantiates if so
Public methodSolve
Computes the solution to the least squares problem Ax = b.
Top
Remarks
Class SVDRegressionCalculation finds the minimal norm solution to the overdetermined linear system:
Ax = b
That is, this class finds the vector x that minimizes the 2-norm of the residual vector Ax - b.
See Also