-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Should SVD should return U,S,V' or U,S,V #912
Comments
cc @alanedelman |
For reasons of performance and Matlab compatibility, I vote with keep the current behavior. Matlab:
(They really should have named that matrix Vt or Vp in their documentation!) |
No, matlab does it the other way. We return |
Ah. Thanks for explaining. In general I'm in favor of doing less (i.e., return whatever LAPACK gives us), but the Matlab compatibility would be an issue for people migrating over. |
I think we should do the Matlab-compatible version even though I generally find it annoying. It's also the more mathematically correct form since that's how the factorization is always written (so that U and V are both column-orthonormal, rather than V being row-orthonormal). It's kind of annoying though since I frequently transpose V immediately. |
I propose that we define |
I like it. |
But we may end up modifying lapack, in which case we won't be able to compute both svd and svdt efficiently. And if multiplication by the transpose is wanted we're better off writing |
i like stephan's answer On Fri, Jul 6, 2012 at 4:48 AM, Jeff Bezanson <
|
The X*V' doesn't actually need a transpose in any case. When/if we modify LAPACK for this, we can either just implement svd in terms of svdt, or allow a stride parameter in the outputs, or have two different routines. |
Decision is to have |
To clarify |
Closed by commit afcace2 |
LAPACK returns V', which is what julia returns currently. Should it return V instead? Unless there is a clear reason, I would prefer not doing the extra transpose in svd.
The text was updated successfully, but these errors were encountered: