Skip to content

LDA with Collapse Gibbs Sampling and Stochastic Variational Inference

License

Notifications You must be signed in to change notification settings

haofuml/sta663_project_lda

Repository files navigation

sta663_project_lda

LDA with Collapse Gibbs Sampling and Stochastic Variational Inference

Report

Project Requirement

Development Environment

Environment Setup

  • Fetch git repo:
git clone https://github.com/haofuml/sta663_project_lda.git
cd sta663_project_lda
  • Install packages:
pip install --index-url https://test.pypi.org/simple/ sta663_project_lda

Data Preparation

  • generate toy dataset:
python -m sta663_project_lda.preprocessing.gen_toydata
  • prepare NYT dataset:
python -m sta663_project_lda.preprocessing.gen_nytdata

Experiments

  • Toy dataset results:
python -m sta663_project_lda.algorithms.lda_gibbs
python -m sta663_project_lda.algorithms.lda_svi

alternatively:

Exceute lda_test.ipynb in jupyter notebook

  • Computational efficiency comparison:

Exceute lda_time.ipynb in jupyter notebook

  • New York Times dataset results:

Exceute lda_nytime.ipynb in jupyter notebook

Results

These are the top ten words in each topic on New York Times dataset.

  • collapsed gibbs method collapsed gibbs
  • stochastic variational method svi

Reference

About

LDA with Collapse Gibbs Sampling and Stochastic Variational Inference

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published