A distribution is a law over a space: the type the RIPr problem
consumes as the alternative \(Q\) and returns as
\(\widehat{P}^*\). It implements log_density() and draw()
over the points in its sample_space.
Usage
distribution(sample_space = space())Arguments
- sample_space
The space this is a law over.
Examples
# `distribution` is abstract; mixture() subclasses it, e.g.
fam <- multinomial_family(n_trials = 4L, k = 3L)
Q <- fam(c(0.5, 0.3, 0.2))
S7::S7_inherits(Q, distribution)
#> [1] TRUE