jesterTOV.inference.base.prior.LogisticDistribution#

class LogisticDistribution(parameter_names, **kwargs)[source]#

Bases: Prior

Logistic distribution prior.

Note: This class follows the Jim/jimgw architecture.

__init__(parameter_names, **kwargs)[source]#

Methods

__init__(parameter_names, **kwargs)

add_name(x)

Turn an array into a dictionary.

log_prob(z)

Evaluate the log probability.

sample(rng_key, n_samples)

Sample from a logistic distribution.

Attributes

n_dim

parameter_names

composite

log_prob(z)[source]#

Evaluate the log probability.

Parameters:

z (dict[str, Float]) – Dictionary of parameter names to values.

Return type:

Float

Returns:

log_prob (Float) – The log probability.

sample(rng_key, n_samples)[source]#

Sample from a logistic distribution.

Parameters:
  • rng_key (PRNGKeyArray) – A random key to use for sampling.

  • n_samples (int) – The number of samples to draw.

Return type:

dict[str, Float[Array, 'n_samples']]

Returns:

samples (dict) – Samples from the distribution. The keys are the names of the parameters.