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 xrvs(self, size=None)
: generates size variates from distributionppf(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