-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add absolute and relative tolerances for rank #15
Comments
This would be a relatively easy first PR if someone wants to tackle it. |
@kshyatt Thanks a lot for the heads up - this is my very first issue correction attempt. Any comments are more than appreciated! I have at least 2 problems with my submission so far:
Any comments for a noobie are more than appreciated.This is my attempt at modifying the code in linalg/generics.jl at about ~ line 559.
|
I would try something like this:
|
Thanks a lot @jw3126 ! I just tried to submit it as a first PR. The PR submission is JuliaLang/julia#19014 and I appreciate any and all criticism. |
|
Hi @miguelraz, If you are not working on this, Can I take this up? |
Sure, no need to ask—just go for it and make a PR! |
Go for it @sam0410 ! |
Fixed by JuliaLang/julia#29926. |
Related julia-dev discussion: https://groups.google.com/d/msg/julia-dev/GAdcYzmibyo/iOLpyVQc8YIJ
The function rank should allow the user to set both absolute and relative tolerances using keyword arguments:
where reltol is a relative tolerance with respect to the largest singular value of A.
As a bonus, it would also be nice to have a
mlrank
(multilinear rank), which is one way to generalize rank to tensors (the only computationally tractable way). The multilinear rank of a tensorT
is defined as a vector/tuple of ranksR
, one for each mode of the tensor (in the matrix case, the column rank equals the row rank).R[n]
is defined as the dimension of the space spanned by mode-n vectors ofT
. To getR[1]
, you take the svd of a matrix containing all column vectors of T and look at its dimensionality. I.e.,R[1] = sum(svdvals(T[:,:]) .> abstol)
. ForR[2]
, you do the same but for the row vectors ofT
, and so on.The text was updated successfully, but these errors were encountered: