liveBook · Manning

Dirichlet distribution

As explained in Natural Language Processing in Action, Second Edition

A Dirichlet distribution is a probability distribution over categorical probability vectors whose components are nonnegative and sum to one.

A Dirichlet distribution describes probability mixtures: nonnegative weights that sum to one. In topic modeling, it represents how strongly a document combines several topics. section 4.5

Latent Dirichlet allocation (LDiA) uses this distribution as a prior for the topics assigned to documents and for the words assigned to topics. Each document becomes a mixture of an arbitrary number of selected topics. section 4.5

The document-generation analogy separates the modeling decisions:

  • A Poisson distribution determines how many words the document contains. section 4.5.1
  • A Dirichlet distribution determines how many topics to mix into the document. section 4.5.1
  • A term-topic matrix supplies word probabilities for the selected topics. section 4.5.1

A document character sheet

Imagine rolling complicated dice to generate a document, like combining dice rolls to create a Dungeons & Dragons character sheet. One roll chooses the document's topic mixture; later steps select topic-appropriate words. section 4.5.1

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Explains the distribution's modeling role and generative sequence, but does not derive its mathematics or estimation procedure.
Examples
Uses a Dungeons & Dragons dice analogy and a document-generation process involving topic mixtures and word selection.
What it assumes
Builds on topic modeling, word counts, latent semantic analysis, and the statistical idea of a prior.
What you can do after
Evaluate how LDiA represents documents as mixtures of topics and assigns probabilistic roles to words.
How it connects
Connects Dirichlet distributions to latent Dirichlet allocation, topic modeling, Poisson distributions, and term-topic matrices.

Also explained in

Compare how 2 books explain Dirichlet distribution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.