public class OLSSolverBySVD extends Object
Ax = yhas more rows than columns. That is, there are more equations than unknowns. One important application is linear regression, where A is the independent factors, y the dependent observations. The solution x^ minimizes:
|Ax - y|2That is, x^ is the best approximation that minimizes the sum of squared differences between the data values and their corresponding modeled values. The approach is called "linear" least squares since the solution depends linearly on the data.
x^ = (AtA)-1Aty,This implementation does not use the above formula to solve for x^ because of the numerical stability problem in computing AtA. Instead, we use SVD decomposition, an orthogonal decomposition method that is numerically stable. SVD allows approximation by truncating small singular values.
|Constructor and Description|
Construct an OLS solver for an over-determined system of linear equations.
|Modifier and Type||Method and Description|
In the ordinary least square sense, solve Ax = y
public OLSSolverBySVD(double epsilon)
epsilon- a precision parameter: when a number |x| ≤ ε, it is considered 0
Copyright © 2010-2016 Numerical Method Incorporation Limited. All Rights Reserved.