initialize_priors_from_posteriors¶
- autoeis.utils.initialize_priors_from_posteriors(posterior: Mapping[str, ndarray[float]], variables: Iterable[str], dist_type: str = 'lognormal') dict[str, Distribution] ¶
Creates new priors based on the posterior distributions.
- Parameters:
posterior (Mapping[str, np.ndarray[float]]) – Posterior distributions for the circuit parameters as a dictionary of parameter names and distributions.
variables (Iterable[str]) – List of variable names.
dist_type (str, optional) – Type of prior distribution to use. Default is “lognormal”.
- Returns:
Priors for the circuit parameters as a dictionary of parameter names and distributions.
- Return type:
dict[str, Distribution]
Notes
To create new priors, a log-normal (or as specified) distribution is fitteed to the posterior distributions and the fitted parameters (e.g., mean, std, etc.) are used to generate the priors.
For the exponent of CPE elements, a truncated normal distribution is used no matter what the
dist_type
is.