﻿DoubleSVDLeastSq Class

# DoubleSVDLeastSq Class

Class DoubleSVDLeastSq solves least squares problems by using a singular value decomposition.
Inheritance Hierarchy
SystemObject
CenterSpace.NMath.CoreDoubleSVDLeastSq

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

The DoubleSVDLeastSq type exposes the following members.

Constructors
NameDescription
DoubleSVDLeastSq Constructs a DoubleSVDLeastSq instance with all sizes zero.
DoubleSVDLeastSq(DoubleMatrix) Constructs a DoubleSVDLeastSq instance from the given matrix.
DoubleSVDLeastSq(DoubleMatrix, Double) Constructs a DoubleSVDLeastSq instance from the given matrix. The specified tolerance is used in computing the numerical rank of the matrix.
Top
Properties
NameDescription
Cols Gets the number of columns in the matrix.
Fail Gets the status of the singular value decomposition.
IsGood Gets a boolean value that is true if the singular value decomposition may be used to solve least squares problems; otherwise false.
Rank Gets the numerical rank of the matrix.
Rows Gets the number of rows in the matrix.
Top
Methods
NameDescription
Clone Creates a deep copy of this least squares instance.
Factor(DoubleMatrix) Factors a given matrix so that it may be used to solve least squares problems.
Factor(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.
OnSerializing processing following deserialization
ResidualNormSqr Computes the 2-norm squared of the residual vector.
ResidualVector Computes and returns the residual vector.
Solve Computes the solution to the least squares problem Ax = b.
Top
Remarks
Use class DoubleSVDLeastSq to find the minimal norm solution to the overdetermined linear system:
C#
Ax = b
That is, find 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.