Priors¶
Module for important calculations involving the prior. For example,
when scaling the Latin Hypercube samples to the appropriate prior range
when calculating the posterior if the emulator is connected with an MCMC sampler
-
priors.
all_entities
(dict_params)[source]¶ Generate all the priors once we have specified them.
- Param
dict_params (dict) - a list containing the description for each parameter and each description (dictionary) contains the following information:
distribution, specified by the key ‘distribution’
parameter name, specified by the key ‘parameter’
specifications, specified by the key ‘specs’
- Returns
record (list) - a list containing the prior for each parameter, that is, each element contains the following information:
parameter name, specified by the key ‘parameter’
distribution, specified by the key ‘distribution’
-
priors.
entity
(dictionary)[source]¶ Generates the entity of each parameter by using scipy.stats function.
- Param
dictionary (dict) - a dictionary containing information for each parameter, that is,
distribution, specified by the key ‘distribution’
specifications, specified by the key ‘specs’
- Returns
dist (dict) - the distribution generated using scipy
-
priors.
log_prod_pdf
(desc: dict, parameters: dict) → float[source]¶ Calculate the log-product for a set of parameters given the priors
- Param
desc (dict) - dictionary of parameters
- Param
parameters (np.ndarray) - an array of parameters
- Returns
log_sum (float) - the log-product of when the pdf of each parameter is multiplied with another