Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ls documentation could use clarification #122

Open
kxygk opened this issue Feb 21, 2022 · 1 comment
Open

ls documentation could use clarification #122

kxygk opened this issue Feb 21, 2022 · 1 comment

Comments

@kxygk
Copy link

kxygk commented Feb 21, 2022

the documentation for ls could maybe be clarified a bit.

if you have ax=b
a is 3-by-2
b is 3-by-1
then
x should be 2-by-1

ls! as well as ls however both returns a 3-by-1
The docstring however strongly suggests you will get x back!

at least with ls! this is maybe understandable b/c it's reusing memory - but it'd be nice to make a note of what's going on

I was scratching my head for a couple hours trying to figure out what the heck was going on and why my results were the wrong dimension. I only figured it out when I saw in your example: https://dragan.rocks/articles/17/Clojure-Numerics-5-Orthogonalization-and-Least-Squares that the value corresponds to unused terms in the direct QR backsubstitution

Subsequent rows should just discarded if you are looking for the least squared solutions to your b columns

Thanks for the great library as always :)

@blueberry
Copy link
Member

blueberry commented Feb 21, 2022

Thank you for reporting that. I'll see to make it more clear.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants