numpy - How to tell if a sparse matrix can't be solved -


I used Python to solve a linear equation using Python Matrix (CSR_metrics) I am writing a program. The matrix is ​​quite large (M = 90826x90826, B = 90826x1) and it is difficult to check by hand.

The problem I have encountered is that for a small fraction of the matrix I am making, Sippi .sparse.linalg.spsolve (M, B) passes through such a calamity failure that the whole program Crashes. Even in an attempt by wrapping the line / leaving the program in the second / except that it does not help I do not get any feedback in the exception field.

I have manually verified that what I am sending is wrong for me, but I can not really see it anywhere else. My program involves detecting the face, and may be due to detecting the problem. In this case, the "face" was found in the cheeks of the actual face, however, manually verifying that it is correct to find out before proceeding, there really is no substitute (the final product is used by non-technical clients ) And automatic verification is beyond the scope of the project.

However, if I just tell the matrix the reason for crashing the Sposolove, then it is OK to leave the image. But I can not seem to find the literature about preventing accidental crashes.

I'm typing the value float64 and can be positive or negative, from the solution of the matrix which I have seen, M is usually filled with 4 and -1, whereas B is almost any Can be positive or negative numbers.

Without knowing the exact error, it is difficult to say what is going wrong I'm too much I'm not familiar, but I suspect that due to the incompatible system these problems are not resolved, you will get a meaningful error.

My best guess will be the memory issue during Gaussian eradication, sparse matrix can be filled in a large quantity, where the zeros become non-zero. For example, a non-zero with the top row can potentially go up to the diagonal (set to non-zero) in all the zeros given below Have you experimented with different node rendering (permc_spec parameters)? The default should be a very good job, but some underlying options have been given, I think it will not be a fool to try them.

How it works (with pictures) is a very good description!) (Although this is a MathWorld site, any implementation will be different from SIP).

Alternatively, if you can accept a close-up-to-right answer, there are many ways to get the approximate answer in a fraction of the time and memory requirements. Without knowing more about it, it is difficult to say which one would be best - but you can experiment with any work under 'Interactive methods for linear equation systems'.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -