dimforge / dimforge/nalgebra

qr.solve() cannot handle overdetermined systems

Open
#1,579 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

https://github.com/dimforge/nalgebra/blob/96c5d876f49afbcb0c22748b4f548b654cfef4fe/src/linalg/qr.rs#L216

I suggest to update `solve_mut` to return the least squares solution in the case when the problem is overdetermined. Note that does this as well. Also Julia and octave take `A \ b` as $\| A x - b\|_2 -> \min$.

All that needs to be done is to multiply b with q.transpose() from left and solve then.

May I draft a pull request for this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.