Represents the solution to a least squares problem.
SystemObject Extreme.Mathematics.LinearAlgebraLeastSquaresSolver
Namespace: Extreme.Mathematics.LinearAlgebraAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.17114.0)
public sealed class LeastSquaresSolver
Public NotInheritable Class LeastSquaresSolver
public ref class LeastSquaresSolver sealed
[<SealedAttribute>]
type LeastSquaresSolver = class end
The LeastSquaresSolver type exposes the following members.
 Name  Description 

 LeastSquaresSolver 
Constructs a new LeastSquaresSolver
from the matrix of observations and the vector of
outcomes.

Top
Top
 Name  Description 

 Equals  Determines whether the specified Object is equal to the current Object. (Inherited from Object.) 
 GetHashCode  Serves as a hash function for a particular type. (Inherited from Object.) 
 GetPredictions 
Returns a vector containing the predicted
outcomes of the least squares solution.

 GetResiduals 
Returns a vector containing the residuals
of the least squares solution.

 GetResidualSumOfSquares 
Returns the sum of the squares of the residuals
of the least squares solution.

 GetType  Gets the Type of the current instance. (Inherited from Object.) 
 Solve 
Solves the least squares problem and returns the
least norm solution.

 ToString  Returns a string that represents the current object. (Inherited from Object.) 
Top
Use the LeastSquaresSolver class to compute the least squares solution of a
system of equations. When a system of linear equations is overdetermined, an exact solution may not
exist. The least squares solution is the vector that minimizes the sum of the squares of the
residuals. To make sure the solution is uniquely defined, the solution with the smallest norm is returned.
The coefficient matrix and the righthand side must be specified in the constructor.
Several methods are available to compute the solution. These can be selected through the
SolutionMethod property. This is a LeastSquaresSolutionMethod value.
The default is to use a QR decomposition. For illconditioned problems, it may be better
to use a singular value decomposition. If speed is the dominant factor, then the method using
the normal equations is the fastest, at the expense of some accuracy.
A nonnegative least squares solution is restricted by having only positive or zero entries
in the solution. To compute the nonnegative least squares solution, select the value
NonNegative for the solution method.
Numerical Libraries
Supported in: 5.x, 4.x
Reference