liveBook · Manning

Categorical distribution

A categorical distribution is a discrete probability distribution over a finite set of mutually exclusive categories or outcomes.

How 5 Manning books explain it

Fabulous Adventures in Data Structures and Algorithms

A categorical distribution assigns probabilities to a finite set of mutually exclusive categories.

How it is used
Represents weighted finite random choices and supports sampling and later Bayesian calculations.
How deep it goes
Develops projected weights and compares four sampling algorithms, including alias construction and its costs.
Examples
Uses a color-labeled die, zero-weight histogram, and cold-and-sneezing joint distribution.
What you can do after
Build it from scratch in C# with integer weights, or apply `ToCategorical` and `ToJoint` to weighted values.

Read how Fabulous Adventures in Data Structures and Algorithms explains categorical distribution →

Grokking Bayes

A probability distribution over a finite set of mutually exclusive categories with associated probabilities.

How it is used
Represents beliefs about which outcome among discrete alternatives will occur, including rainfall amounts and possible parameter values.
How deep it goes
Defines categories and probability constraints with examples, but defers continuous probability distributions and greater numerical accuracy.
Examples
Uses rainfall amounts, rainfall ranges, and rounded proportion values from 0.0 through 1.0.
What you can do after
Apply categorical probabilities to represent beliefs about discrete outcomes and compare uniform, moderate, or strongly weighted assignments.

Read how Grokking Bayes explains categorical distribution →

Applied Reinforcement Learning

A categorical distribution assigns probabilities to a finite set of mutually exclusive outcomes.

How it is used
Represents discrete action choices in a policy-gradient agent, complementing Gaussian distributions for continuous actions.
How deep it goes
Works through softmax probabilities for three actions and illustrates reinforcement, while focusing the broader treatment on Gaussian policies.
Examples
Calculates softmax probabilities for Low, Medium, and High actions, then shows how returns shift their likelihoods.
What you can do after
Understand how policy-gradient updates increase the likelihood of good discrete actions and suppress the likelihood of poor ones.

Read how Applied Reinforcement Learning explains categorical distribution →

Causal AI

Categorical is a Pyro distribution object representing a categorical probability distribution.

How it is used
Represents discrete outcomes and supplies a Pyro object for randomly generating category indices.
How deep it goes
Defines categories, probabilities, discrete notation, and Pyro sampling, but does not develop categorical inference or parameter estimation.
Examples
Uses food categories, probabilities [.45, .30, .25], Pyro construction, and sampled indices such as tensor(1.).
What you can do after
Apply it via Pyro by constructing a Categorical object with probabilities and calling sample() for random category generation.

Read how Causal AI explains categorical distribution →

Math and Architectures of Deep Learning

A discrete probability distribution over exactly one of several mutually exclusive classes in a single trial.

How it is used
Frames single-trial class uncertainty for machine-learning problems involving classification and probability distributions.
How deep it goes
Defines class probabilities, relates categorical to Bernoulli and multinomial distributions, and represents outcomes with one-hot vectors.
Examples
Uses a four-class photo database containing Einstein, Curie, Gauss, and other-photo outcomes.
What you can do after
Evaluate/understand single-trial class probabilities and encode outcomes as one-hot vectors.

Read how Math and Architectures of Deep Learning explains categorical distribution →

Also covered in

What to know first

Related concepts

Questions about categorical distribution

What is categorical distribution?

A categorical distribution is a discrete probability distribution over a finite set of mutually exclusive categories or outcomes.

Which Manning books explain categorical distribution?

Fabulous Adventures in Data Structures and Algorithms, Grokking Bayes, Applied Reinforcement Learning, Causal AI and Math and Architectures of Deep Learning.

What should I know before learning categorical distribution?

Manning books that teach categorical distribution usually introduce probability distribution, mean, random variable and parameter first.

What kinds of categorical distribution are there?

Kinds of categorical distribution include Bernoulli distribution.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.