gcfit.probabilities.priors.Priors#

class gcfit.probabilities.priors.Priors(priors, fixed_initials=None, *, logged=True, err_on_fail=False)#

Representation of the prior likelihood functions on various parameters.

Contains the individual prior likelihood functions for each parameter, as a corresponding *Prior object, and handles all interation with them.

Calls to the prior-likelihood should be made to this class, with a given theta, which will be distributed to the relevant parameter-specific functions.

Parameters:
priorsdict

A dictionary describing the prior function for each parameter. Each value should be either one of the _PriorBase subclasses, or a list of [“prior name”, *function args]. Any missing parameters will be filled in with DEFAULT_PRIORS.

fixed_initialsdict, optional

A dictionary of any parameters which have fixed values, used in cases of dependant priors with these values.

loggedbool, optional

Whether to log the returned likelihoods. Defaults to True.

err_on_failbool, optional

If any called theta parameters return “invalid” priors (i.e. L <= 0), will raise an exception. If False (default), will simply log the failure and continue.

Methods

__init__(priors[, fixed_initials, logged, ...])