Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 1.44 KB

README.md

File metadata and controls

26 lines (21 loc) · 1.44 KB

SVD vs CUR Decomposition

Course Number : CS F469

Contributors :

  • G V Sandeep
  • Kushagra Agrawal
  • Snehal Wadhwani

Aim : To compare the SVD vs CUR Decomposition on given set of recommendations

Language : Python v2.7.12

Working :
  1. A function defined in common.py handles the input from the corpus and a matrix of user-movie ratings is made. This function is used by all other files that use the user-movie ratings matrix.
  2. The file single_iter_svd_.py (which uses functions defined in svd.py) decomposes the ratings matrix into the appropriate U, sigma and V matrices based on the eigenvalues and eigenvectors calculated using python's numpy package. The eigenvectors are further pruned on the basis of whether they result in eigenvaleus being positive. If not, the sign of the corresponding eigenvector in U is reversed.
  3. The file cur_replace.py performs the CUR decomposition on the ratings matrix in a manner similar to the previous two files that give the SVD decomposition.
  4. This file uses the svd function defined in svd.py for one of its intermediate steps.
Setting up:
  1. Install python's numpy package.
  2. Run single_iter_svd.py, multi_iter_svd.py and cur.py for the comparison between the two decompositions.