Skip to content

Implement Latent Dirichlet Allocation (LDA) Example #27

@albertpod

Description

@albertpod

I'd like to propose adding a Latent Dirichlet Allocation (LDA) example to the codebase. Looking at the current functionality, it seems we already have all the necessary building blocks in place - specifically the DirichletCollection and MultinomialPolya nodes!

LDA would make an excellent addition to our examples for several reasons:

  1. It's a fundamental topic model widely used in text analysis and machine learning
  2. It would demonstrate RxInfer's capability with hierarchical Bayesian models
  3. It exercises multiple probability distributions in combination
  4. The results are intuitive and visually presentable

The generative model is straightforward:

  • Topic-word distributions: φₖ ~ Dirichlet(β)
  • Document-topic distributions: θₗ ~ Dirichlet(α)
  • Topic assignments: zₗₙ ~ Multinomial(θₗ)
  • Words: wₗₙ ~ Multinomial(φzₗₙ)

This seems like a relatively easy yet powerful example to implement that would showcase RxInfer.jl's strengths. It could also serve as a benchmark against other probabilistic programming frameworks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions