-
Notifications
You must be signed in to change notification settings - Fork 125
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
Unexpected: Failure "the matrix does not have an inverse" #602
Comments
The implementation of linear algebra functions in |
I suppose that the problem is here:
In order to have a look at the algorithm, I wanted to look at:
Any hint? |
And they later improved it: https://www.researchgate.net/profile/Syed-Shah-132/publication/220337321_An_Efficient_and_Generic_Algorithm_for_Matrix_Inversion/links/53ef499a0cf2711e0c42f05a/An-Efficient-and-Generic-Algorithm-for-Matrix-Inversion.pdf If it's ok, I'll write a PR. Best regards |
@ttamttam Thanks! A PR to fix this issue would be much appreciated! |
In the following, The current implementation is taken from this article.
The number of multiplication/division performed by the algorithm is The current implementation could be improved a little by re-ordering some The main problem is that, as it's stated in the publication, it's not numerically The same authors also published an improved version of the algorithm:
It allows the "selection of pivot randomly in the matrix thus supporting partial So, we could improve the implementation by selecting off-diagonal pivots (by I'm not sure it is really worth it thought. Because even with this strategy, I One solution would be to let the implementation as-is, and just try a more Another one would be to always use the Let me know what you would prefer? 1- improve the current implementation and add a backup computation with 2- or simply replace it with the one-line |
@ttamttam Thanks for the deep dig! I vaguely recall that the current OCaml implementation of @tachukao Calvin, what would be your suggestions about this issue? |
@ttamttam thanks for looking at this! If there's no significant performance gain (sounds to me they're both n^3?), I would also prefer the likely more stable |
Is there a problem, or is there something I did not understood?
The text was updated successfully, but these errors were encountered: