matrix
matrix copied to clipboard
QR Decomposition with column pivoting
My goal is to implement an equivalent to the LINEST function in excel. The goal is to calculate a mulitple linear regression for matrices that are potentially not full rank. My (limited) understanding is that this requires doing "column pivoting" in the implementation of QR decomposition. Does ml-matrix
support this algorithm? Currently it seems that QrDecomposition.solve
fails when the matrix is not full rank.
It probably doesn't support this algorithm. Do you have a reference on this?
-
Julia notebook, "Householder QR with column pivoting": https://hua-zhou.github.io/teaching/biostatm280-2019spring/slides/11-qr/qr.html#Householder-QR-with-column-pivoting
-
Here is an explaination from
lapack
docs: https://www.netlib.org/lapack/lug/node42.htmlTo solve a linear least squares problem (2.1) when A is not of full rank, or the rank of A is in doubt, we can perform either a QR factorization with column pivoting ...
-
Here is a Rust implementation in
nalgebra
: https://github.com/dimforge/nalgebra/pull/613/files