简体   繁体   English

JAVA中的大型稀疏矩阵特征分解

[英]Large Sparse Matrix Eigendecomposition in JAVA

I am looking for a linear algebra library in Java which can handle large "sparse" matrices of size (say 1 million by 1 million) and perform decompositions like SVD,LU on the matrices. 我正在寻找Java中的线性代数库,该库可以处理大小较大的“稀疏”矩阵(比如说100万乘以100万),并对矩阵执行诸如SVD,LU之类的分解。

I looked around and tried COLT, however it can only handle matrices upto a fixed number of elements. 我环顾四周并尝试了COLT,但是它只能处理最多固定数目的元素的矩阵。

EJML site also mentions that it won't be able to handle this. EJML网站还提到它将无法处理此问题。 (http://code.google.com/p/efficient-java-matrix-library/wiki/FAQ) (http://code.google.com/p/efficiency-java-matrix-library/wiki/FAQ)

I know that there are packages out there in C++ which can handle data of this size, however, I can not move from Java as I have all other code built around Java. 我知道在C ++中有一些可以处理这种大小数据的软件包,但是,由于所有其他围绕Java构建的代码,我都不能离开Java。

Any thoughts? 有什么想法吗? Any help is greatly appreciated! 任何帮助是极大的赞赏!

Try to look at la4j (Linear Algebra for Java). 尝试看一下la4j (Java的线性代数)。 It handles sparse matrices as well as dense ones. 它可以处理稀疏矩阵和密集矩阵。 So you can try something like this: 因此,您可以尝试执行以下操作:

Matrix a = new CRSMatrix(...); // Compressed Row Storage format
Matrix vd[] = a.decompose(Matrices.EIGEN_DECOMPOSITOR); // vd[0] = V, vd[1] = D

So, it works fine with sparse matrices, but I'm not sure about (1 million X 1 million) size. 因此,它适用于稀疏矩阵,但我不确定大小(100万X 100万)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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