RubixML / Tensor

A library and extension that provides objects for scientific computing in PHP.
https://rubixml.com
MIT License
223 stars 27 forks source link

Singular Value Decomposition (SVD) #9

Closed andrewdalpino closed 3 years ago

andrewdalpino commented 3 years ago

Singular Value Decomposition (SVD) is used in a few machine learning methods such as Latent Semantic Analysis (LSA), collaborative filtering recommender systems, and more. It generalizes the eigendecomposition of a square normal matrix to any m x n matrix via an extension of the polar decomposition. This ticket is to research the best SVD algorithm (or set of algorithms) to implement that covers the two aforementioned use cases. Note that we'll need both PHP and Zephir/C implementations of SVD, however, for the prototype it would be perfectly fine to focus on one (PHP) or the other (Zephir/C).

https://en.wikipedia.org/wiki/Singular_value_decomposition

https://en.wikipedia.org/wiki/Matrix_factorization_(recommender_systems)

https://en.wikipedia.org/wiki/Latent_semantic_analysis

https://numpy.org/devdocs/reference/generated/numpy.linalg.svd.html

andrewdalpino commented 3 years ago

Implemented here https://github.com/RubixML/Tensor/commit/795101229a4a197c44fe0aa55fd596fa70ba0958