pmrf.distributions.parameter
Classes
|
- class pmrf.distributions.parameter.JointParameterDistribution(param_groups, param_names, kind='prior')[source]
Bases:
Distribution
- Parameters:
param_groups (list[ParameterGroup])
param_names (list[str])
- reparametrized_params = []
- has_rsample = True
- sample(key, sample_shape=())[source]
Returns a sample from the distribution having shape given by sample_shape + batch_shape + event_shape. Note that when sample_shape is non-empty, leading dimensions (of size sample_shape) of the returned sample will be filled with iid draws from the distribution instance.
- Parameters:
key (jax.random.PRNGKey) – the rng_key key to be used for the distribution.
sample_shape (tuple) – the sample shape for the distribution.
- Returns:
an array of shape sample_shape + batch_shape + event_shape
- Return type:
numpy.ndarray
- log_prob(value)[source]
Evaluates the log probability density for a batch of samples given by value.
- Parameters:
value – A batch of samples from the distribution.
- Returns:
an array with shape value.shape[:-self.event_shape]
- Return type:
numpy.ndarray
- icdf(u)[source]
The inverse cumulative distribution function of this distribution.
- Parameters:
q – quantile values, should belong to [0, 1].
- Returns:
the samples whose cdf values equals to q.