- LeastSquaresSolution
- LeastSquaresSolutionDC
- LeastSquaresSolutionSVD
- LeastSquaresSolutionWY
- LeastSquaresSolutionsQRPivot
- LeastSquaresSolutionQRTallSkinny
- LeastSquaresGaussMarkov2
LeastSquaresGaussMarkov2
Solves a general Gauss-Markov linear model (GLM) problem
minimize || y ||_2 subject to d = A*x + B*y
|
where A is an n-by-m matrix, B is an n-by-p matrix, and d is a given n-vector. It is assumed that m <= n <= m+p, and rank(A) = m and rank( A B) = n.
Under these assumptions, the constrained equation is always consistent, and there is a unique solution x and a minimal 2-norm solution y, which is obtained using a generalized QR factorization of the matrices (A, B) given by
A = Q*(R), B = Q*T*Z.
|
In particular, if matrix B is square nonsingular, then the problem GLM is equivalent to the following weighted linear least squares problem
minimize || inv(B)*(d-A*x) ||_2
|
where inv(B) denotes the inverse of B. LAPACK function GGGLM.
Computing for type matrix<double>
bool matrix::LeastSquaresGaussMarkov2(
|
Computing for type matrix<float>
bool matrixf::LeastSquaresGaussMarkov2(
|
Computing for type matrix<complex>
bool matrixc::LeastSquaresGaussMarkov2(
|
Computing for type matrix<complexf>
bool matrixcf::LeastSquaresGaussMarkov2(
|
Parameters
B
[in] Second matrix B of the GLM problem.
D
[in] Matrix D whose column is the right-hand side for the system of equations, matix D must contain only one column. Vector D contains one column of right-hand side.
X
[out] Matrix or vector X with solutions of GLM problem.
Y
[out] Matrix or vector Y with solutions of GLM problem.
Return Value
Return true if successful, otherwise false in case of an error.
Note
Output vector X has size m, and output vector Y has size p. For matrix overloads, X has m rows and Y has p rows, with the same number of columns as D.