HARK
HARK copied to clipboard
Consistent API for DiscreteDistribution and subclasses (like DiscreteDistributionLabeled)
DiscreteDistribution
has two public attributes, pmv
and atoms
.
DiscreteDistributionLabeled
subclasses DiscreteDistribution
, and has a pmv
attribute.
But instead of atoms
it has data
, though these attributes have identical comments/documentation.
Discrete point values for each probability mass.
For multivariate distributions, the last dimension of atoms must index
"atom" or the random realization. For instance, if atoms.shape == (2,6,4),
the random variable has 4 possible realizations and each of them has shape (2,6).
Is there a good reason for this change? This makes it harder to swap a labeled disitribution in for an unlabeled one.