particles.distributions.ProbDist

class ProbDist[source]

Base class for probability distributions.

To define a probability distribution class, subclass ProbDist, and define methods:

  • logpdf(self, x): the log-density at point x

  • rvs(self, size=None): generates size variates from distribution

  • ppf(self, u): the inverse CDF function at point u

and attributes:

  • dim: dimension of variates (default is 1)

  • dtype: the dtype of inputs/outputs arrays (default is ‘float64’)

__init__()

Methods

__init__()

logpdf(x)

pdf(x)

ppf(u)

rvs([size])

shape(size)

Attributes

dim