Stable LDA is a stable topic modeling approach that generates stable model estimations. Variables generated from Stable LDA can lead to more consistent estimations in regression analyses.
In this repo, we demonstrate the use of Stable LDA in topic modeling (data exploration) and regressions (variable generation).
- stability_experiment shows the use of Stable LDA for topic modeling and stability validation.
- stackexchange_empirical shows the use of Stable LDA on the stackexchange dataset. LDA is benchmarked as well.
- stackexchange_topic_modeling shows the use of Stable LDA for topic modeling.
- Python2.7
- gensim==3.8.3
- scipy==1.2.3
- scikit-learn==0.19.1
- gcc==9.4.0 (Ubuntu) or mingw32-make (GNU Make 4.3) (Windows)
Note: the code has been tested on both Ubuntu and Windows system, but it is only tested in Python2.7, not in Python3+ yet.
For Windows user,
- Comment line 14 in the Makefile, and Uncomment line 13 in the Makefile
- Comment line 313 in the stablelda.py, and Uncomment line 312 in the stablelda.py
- Run command
mingw32-make
For Linux user,
- Comment line 13 in the Makefile, and Uncomment line 14 in the Makefile
- Comment line 312 in the stablelda.py, and Uncomment line 313 in the stablelda.py
- Run command
make