Skip to content

DiscreteDistribution

A probability distribution for discrete values.

Parameters

  • seed (int) – defaults to None

    Random number generator seed for reproducibility.

Attributes

  • mode

    The most likely value in the distribution.

  • n_samples

    The number of observed samples.

Methods

call

Probability mass/density function.

Parameters

  • x (Any)
revert

Reverts the parameters of the distribution for a given observation.

Parameters

  • x (Hashable)
sample

Sample a random value from the distribution.

update

Updates the parameters of the distribution given a new observation.

Parameters

  • x (Hashable)