Least Squares Solver<T> Constructor
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
public LeastSquaresSolver(
Matrix<T> observations,
Vector<T> outcomes
)
Parameters
Remarks
Use this constructor to create a least squares solution based on the matrix of observations and the vector of outcomes. The number of rows in observations must equal the number of elements in outcomes. In addition, the number of rows in observations must be greater than or equal to the number of columns.
Each row in the matrix observations corresponds to an observation. The corresponding element of the vector specifies the outcome produced by this observation.
Because there are at least as many equations as there are unknowns, an exact solution is not possible. The goal is therefore to minimize the two-norm of the residual vector Ax - b, where A corresponds to observations and b corresponds to outcomes. The vector x with this property is the solution to this problem with minimal norm.