twinlab.CalibrateParams#

class twinlab.CalibrateParams(y_std_model=False, return_summary=True, iterations=10000, n_chains=2, force_sequential=False, start_location='random', seed=None)[source]#

Parameter configuration for inverting a trained emulator to estimate the input parameters that generated a given output.

Variables:
  • y_std_model (Union[bool, pd.DataFrame], optional) – Whether to include model noise covariance in the likelihood. If True, your model’s noise covariance is included in the likelihood, which can help account for uncertainties in the model predictions. If False, your model’s noise covariance is not included in the likelihood; this assumes the model’s predictions are precise. If a pandas.DataFrame is supplied, it must contain the same columns as the set of emulator outputs, specifying the noise covariance for each output. The default value is False.

  • return_summary (bool, optional) – Should the result of the inversion be presented as a summary or as the full solution? If True then return a summary of the inverse solution. If False return the entire history of the points sampled. The default value is True.

  • iterations (int, optional) – The number of points to sample in each inversion chain. More points is better. The default value is 10,000.

  • n_chains (int, optional) – The number of independent chains to use for the inversion process. More is better, so that the solution derived between indepent chains can be compared and convergence can be checked. The default value is 2 and the maximum is 4.

  • force_sequential (bool, optional) – “Whether to force the chains to run sequentially, rather than in parallel.” If True the sampling processes will run one sample at a time, which can be useful when parallel processing is not desired. The default value is False.

  • start_location (str) – The starting locations for the calibration process. If the string optimized is provided, the starting location of all chains are taken as the maximum a posteriori (MAP) estimate. If the string random is provided, the starting location for each chain is randomly generated.

  • seed (Union[int, None], optional) – Specifies the seed used by the random number generator to start the inversion process. Setting the seed to an integer is good for reproducibility. The default value is None, which means the seed is randomly generated each time.

__init__(y_std_model=False, return_summary=True, iterations=10000, n_chains=2, force_sequential=False, start_location='random', seed=None)[source]#

Methods

__init__([y_std_model, return_summary, ...])

unpack_parameters()