Gibbs sampler for the Hierarchical Latent Dirichlet Allocation topic model. This is based on the hLDA implementation from Mallet, having a fixed depth on the nCRP tree.
Project description
Hierarchical Latent Dirichlet Allocation
Hierarchical Latent Dirichlet Allocation (hLDA) addresses the problem of learning topic hierarchies from data. The model relies on a non-parametric prior called the nested Chinese restaurant process, which allows for arbitrarily large branching factors and readily accommodates growing data collections. The hLDA model combines this prior with a likelihood that is based on a hierarchical variant of latent Dirichlet allocation.
Hierarchical Topic Models and the Nested Chinese Restaurant Process
The Nested Chinese Restaurant Process and Bayesian Nonparametric Inference of Topic Hierarchies
Implementation
- hlda/sampler.py is the Gibbs sampler for hLDA inference, based on the implementation from Mallet having a fixed depth on the nCRP tree.
Installation
- Simply use
pip install hlda
to install the package. - An example notebook that infers the hierarchical topics on the BBC Insight corpus can be found in notebooks/bbc_test.ipynb.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hlda-0.3.1.tar.gz
.
File metadata
- Download URL: hlda-0.3.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/45.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22d00b6952aff0ed4ba71d645ba8a7f69e42e096dc638ae251a0c961b85c77ab |
|
MD5 | 8386a59da36cf189a357d45d724c2cab |
|
BLAKE2b-256 | 8791c9b93b494794414dbf1580aaad0604a08f100cfaf997bd57632296c96110 |
File details
Details for the file hlda-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: hlda-0.3.1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/45.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16e1cc1aefcccc5077cdc2cb6e03e46fd628e6e2c5b234fc21518f5ac0053d54 |
|
MD5 | 093f0fd5761e942f7e53c92fea53357b |
|
BLAKE2b-256 | d9ed6229166d23acecb976f99474f543d13221093afcb0bfc6a24af1af898940 |