Skip to main content

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.

Release files for hlda 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hlda 0.3.1
File Size Uploaded
hlda-0.3.1.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hlda 0.3.1
File Interpreter ABI Platform
hlda-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / hlda-0.3.1.tar.gz

Download URL hlda-0.3.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
22d00b6952aff0ed4ba71d645ba8a7f69e42e096dc638ae251a0c961b85c77ab
BLAKE2b-256 checksum
How to use checksums
8791c9b93b494794414dbf1580aaad0604a08f100cfaf997bd57632296c96110
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / hlda-0.3.1-py3-none-any.whl

Download URL hlda-0.3.1-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16e1cc1aefcccc5077cdc2cb6e03e46fd628e6e2c5b234fc21518f5ac0053d54
BLAKE2b-256 checksum
How to use checksums
d9ed6229166d23acecb976f99474f543d13221093afcb0bfc6a24af1af898940
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3

2 release files

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page