Singular Value Decomposition in pure javascript