Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j2kun/svd
Python code implementing the power method for Singular Value Decomposition
https://github.com/j2kun/svd
algorithm linear-algebra optimization programming python svd
Last synced: about 2 months ago
JSON representation
Python code implementing the power method for Singular Value Decomposition
- Host: GitHub
- URL: https://github.com/j2kun/svd
- Owner: j2kun
- Created: 2015-08-29T22:23:13.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T02:04:01.000Z (over 1 year ago)
- Last Synced: 2024-04-14T06:08:02.568Z (9 months ago)
- Topics: algorithm, linear-algebra, optimization, programming, python, svd
- Language: Python
- Homepage: https://jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/
- Size: 5.66 MB
- Stars: 99
- Watchers: 11
- Forks: 41
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](http://jeremykun.com/2016/05/16/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](https://jeremykun.com/2016/04/18/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.