Skip to content
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

Support dpotrs, dgetrs, dormqr, dtrtrs, and eigen decomposition for asymmetric matrix #6764

Closed
haifengl opened this issue Nov 25, 2018 · 6 comments
Labels
Enhancement New features and other enhancements ND4J ND4J Issues

Comments

@haifengl
Copy link

haifengl commented Nov 25, 2018

They are needed to solve least square problems with the QR decomposition. ND4J supports QR decomposition already. Thanks.

Aha! Link: https://skymindai.aha.io/features/ND4J-145

@agibsonccc
Copy link
Contributor

@saudet maybe @rcorbish could look at these batch of usses? @haifengl thanks for reporting!

@saudet
Copy link
Contributor

saudet commented Nov 26, 2018

Let's merge issues #6762, #6763, and #6765 here too if it's alright @haifengl?

@haifengl
Copy link
Author

Yes, it is okay to merge them. Thanks.

@haifengl
Copy link
Author

The current support of SVD can be improved too. Typically, we use the input matrix to hold the U after the decomposition. But Nd4j's gesvd() method requires U be a m x m matrix, where m is the number of rows. In most case, m be very large (thousand to millions). We cannot hold such big matrix in memory and it is also meaningless to compute m left singular vectors.

@haifengl
Copy link
Author

haifengl commented Nov 26, 2018

Looking into the nd4j implementations, I would suggest the following improvements:

  • In geqrf (for QR), the input R is required be a matrix of size n x n. In fact, it could be just a vector of size n. Let's call it tau, which just holds the diagonal of R. The R itself is stored in A.

  • Please support dorgqr that generates an M-by-N real matrix Q with orthonormal columns of QR.

  • In general, we need call a function to determine the workspace size before the real decomposition (e.g. QR, SVD, eigen). It is not clear to me how do you decide the workspace size.

Thanks!

@saudet saudet changed the title Support dormqr and dtrtrs Support dpotrs, dgetrs, dormqr, dtrtrs, and eigen decomposition for asymmetric matrix Nov 27, 2018
@saudet saudet added Enhancement New features and other enhancements ND4J ND4J Issues labels Nov 27, 2018
@saudet saudet self-assigned this Nov 27, 2018
@saudet
Copy link
Contributor

saudet commented Nov 27, 2018

@haifengl Sounds good! If you have some time to implement this, feel free to send a pull request. This is not a priority for us, so unless @rcorbish has some time to work on this, we are not likely to spend time on this anytime soon, but feel free to ask questions if you need guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New features and other enhancements ND4J ND4J Issues
Projects
None yet
Development

No branches or pull requests

3 participants