kargibora / svd

Python code implementing the power method for Singular Value Decomposition

Home Page:https://jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVD

An implementation of the greedy algorithm for SVD, using the power method for the 1-dimensional case.

For the post Singular Value Decomposition Part 2: Theorem, Proof, Algorithm

And the first (motivational) post in the series: Singular Value Decomposition Part 1: Perspectives on Linear Algebra

Setup

Run the following to set up all the requirements needed to run the code in this repository.

$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ bash setup.sh   # downloads relevant NLP corpora from nltk

Then run python3 topicmodel.py for the main topic-model routine, svd.py for the core svd algorithm, and demo.py for the numpy examples from the post.

When finished, run $ deactivate to exit the virtual environment.

About

Python code implementing the power method for Singular Value Decomposition

https://jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/


Languages

Language:Python 98.1%Language:Shell 1.9%