mikera / vectorz

Fast and flexible numerical library for Java featuring N-dimensional arrays
GNU Lesser General Public License v3.0
240 stars 46 forks source link

Support truncated singular value decomposition #70

Open mdekstrand opened 9 years ago

mdekstrand commented 9 years ago

For many applications (recommender systems, information retrieval, etc.), only the top k singular values (and their corresponding vectors) are required from the singular value decomposition.

Would be nice to have the SVD methods support a decompose(AMatrix, int) method that specifies the (maximum) number of singular values desired, so we don't waste time and space computing a bunch of unneeded ones.

mikera commented 9 years ago

Sounds very sensible. I don't have time to implement this myself right now, but very happy to take PRs for this one.