Nice properties that matrices in SVD decomposition have?

They are orthonormal. This means columns are orthogonal to each other.

Linear Algebra Review

  • Matrix-vector multiplication
  • Matrix-matrix multiplication

Step-by-step in creating matrices in SVD & NMF

  1. Create Term-Document Matrix (TFIDF)
    • You can use TfidfVectorizer()
  2. For non-negative matrix factorisation (NMF)
    • Decompose it into N components using decomposition.NMF from sklearn
  3. For singular value decomposition (SVD)
    • Decompose into multiple matrices (U, s, V) using decomposition.randomized_svd

Randomised SVD

SVD applied to a big matrix is slow and so randomised SVD provides a solution to this as it can heavily speed things up as shown below:



Data Scientist

Leave a Reply