using a generalized QR factorization of A and B, where A is an N×M matrix, B is an N×P matrix, and d is a vector of length N. It is also assumed that M N M+P and:
Under these assumptions, the constrained equation is always consistent, and there is a unique solution x and a minimal 2-norm solution y. In particular, if matrix B is square nonsingular, then the problem GLM is equivalent to the following weighted linear least squares problem:
|
A: |
1.0 4.0 6.0 |
2.0 9.0 14.0 |
3.0 14.0 23.0 |
|
B: |
11.0 -8.0 2.0 |
-4.0 5.0 -2.0 |
1.0 2.0 1.0 |
|
X Y |
131.0 0.0 |
-154.0 0.0 |
81.0 0.0 |
|