Skip to content

DiscreteDistribution

A probability distribution for discrete values.

Parameters

  • seed

    Typeint | None

    DefaultNone

    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'typing.Any'

revert

Reverts the parameters of the distribution for a given observation.

Parameters

  • x'typing.Hashable'

sample

Sample a random value from the distribution.

update

Updates the parameters of the distribution given a new observation.

Parameters

  • x'typing.Hashable'