简体   繁体   中英

how to get the inverse of distance matrix?

I have a huge distance matrix.

Example: (10000 * 10000)..

Is there an effective way to find a inverse matrix?

I've tried numpy's Inv() but it's too slow.

Is there a more effective way?

You can try using Singular Value Decomposition https://numpy.org/doc/stable/reference/generated/numpy.linalg.svd.html

Inverting the decomposed form might take less time.

You probably don't actually need the inverse matrix.

There are a lot of numeric techniques that let people solve matrix problems without computing the inverse. Unfortunately, you have not described what your problem is, so there is no way to know which of those techniques might be useful to you.

For such a large matrix (10k x 10k), you probably want to look for some kind of iterative technique. Alternately, it might be better to look for some way to avoid constructing such a large matrix in the first place -- eg, try using the source data in some other way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM