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

how to solve a left matrix division efficiently for a very large sparse matrix? #554

Open
bigworld12 opened this issue Feb 24, 2018 · 5 comments

Comments

@bigworld12
Copy link

let's assume the following matrices
a sparse matrix 'kk' 26400x26400
a vector 'fg' 26400x1
delta = kk\fg
evaluating delta in matlab takes about ~0.8 seconds
but as there is no left matrix division that i know of in Math.Net i tried to emulate in these ways
1 : delta = kk.Solve(fg);
2 : delta = kk.Inverse() * fg;
but even after 3 whole minutes, it was still evaluating, so am i missing something here?

@ajos6183
Copy link

@bigworld12, I believe Math.Net doesn't provide any direct solvers for sparse matrices. It will try to solve it as a dense matrix which will take a very long time. I use CSparse.Net for sparse matrices (https://github.com/wo80/CSparse.NET/wiki/Math.NET-Numerics-and-CSparse)

@cdrnet
Copy link
Member

cdrnet commented Feb 27, 2018

(Have you tried the iterative solvers, i.e. SolveIterative?)

@bigworld12
Copy link
Author

@cdrnet which one of them ? (the matrix is square and non-symmetric)
@ajos6183 i already used that but it doesn't have UMFPACK so it gave poor performance with larger matrices compared to matlab

@ajos6183
Copy link

ajos6183 commented Mar 1, 2018

@ChristoWolf
Copy link

Sorry for the necroing, but what is the suggested approach currently?

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

No branches or pull requests

4 participants