HARK icon indicating copy to clipboard operation
HARK copied to clipboard

Consistent API for DiscreteDistribution and subclasses (like DiscreteDistributionLabeled)

Open sbenthall opened this issue 2 years ago • 0 comments

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.

sbenthall avatar Feb 16 '23 18:02 sbenthall