dualbounds.utilities.BatchedCategorical¶
- class dualbounds.utilities.BatchedCategorical(vals, probs)[source]¶
Batched discrete (categorical) distribution.
This class supports the small set of operations needed by the
DualBoundsclass.- Parameters:¶
Methods
from_binary_probs(probs)Instantiates distribution for a binary-valued variable.
from_scipy(scipy_bernoulli)Instantiates distribution from a 1D scipy.stats.bernoulli object.
mean()ppf(q)rvs()