sccoda.model.other_models.SimpleModel.sample_hmc_da¶
-
SimpleModel.
sample_hmc_da
(num_results=20000, num_burnin=5000, num_adapt_steps=None, num_leapfrog_steps=10, step_size=0.01, verbose=True)¶ HMC sampling with dual-averaging step size adaptation (Nesterov, 2009)
Tracked diagnostic statistics:
target_log_prob
: Value of the model’s log-probabilitydiverging
: Marks samples as diverging (NOTE: Handle with care, the spike-and-slab prior of scCODA usually leads to many samples being flagged as diverging)log_acc_ratio
: log-acceptance ratiois_accepted
: Whether the proposed sample was accepted in the algorithm’s acceptance stepstep_size
: The step size used by the algorithm in each step
- Parameters
- num_results :
int
int
(default:20000
) MCMC chain length (default 20000)
- num_burnin :
int
int
(default:5000
) Number of burnin iterations (default 5000)
- num_adapt_steps :
int
,None
Optional
[int
] (default:None
) Length of step size adaptation procedure
- num_leapfrog_steps :
int
,None
Optional
[int
] (default:10
) HMC leapfrog steps (default 10)
- step_size :
float
float
(default:0.01
) Initial step size (default 0.01)
- verbose :
bool
bool
(default:True
) If true, a progress bar is printed during MCMC sampling
- num_results :
- Return type
- Returns
result object
result – Compositional analysis result