LocScalePTM.run_mcmc()#
- LocScalePTM.run_mcmc(seed, warmup, posterior, num_chains=4, fast_warmup=0.5, thinning_posterior=1, thinning_warmup=1, warm_start=True, which=None, strategy='iwls-nuts', cache_path=None, apply_jitter=False, **initialization_kwargs)[source]#
Run MCMC sampling and return sampling results.
- Parameters:
seed (
int) – MCMC scheduling parameters: seed and durations.warmup (
int) – MCMC scheduling parameters: seed and durations.posterior (
int) – MCMC scheduling parameters: seed and durations.num_chains (
int) – Number of parallel chains to run. (default:4)strategy (
Literal['iwls-nuts','iwls_fixed','iwls_fixed-nuts','nuts','iwls-iwls_fixed','manual']) – Which kernel strategy to use for sampling. Seesetup_default_mcmc_kernels(). (default:'iwls-nuts')cache_path (
str|Path|None) – If provided, load/save cached sampling results. (default:None)apply_jitter (
bool) – Whether to apply initial jitter to chain initialisations. Only has an effect if jittering is specified in theliesel.goose.MCMCSpecfor any one variable. Think of this rather as an off-switch than an on-switch. (default:False)warm_start (
bool) – If True, the model will be initialized by finding posterior modes viainitialize(). (default:True)**initialization_kwargs – Forwarded to
initialize()whenwarm_startis True.
- Return type:
SamplingResults- Returns:
SamplingResults – The
liesel.goose.SamplingResultssampling results object containing chains and diagnostics.