sccoda.model.other_models.SimpleModel.sample_nuts¶
-
SimpleModel.
sample_nuts
(num_results=10000, num_burnin=5000, num_adapt_steps=None, max_tree_depth=10, step_size=0.01, verbose=True)¶ HMC with No-U-turn (NUTS) sampling. This method is untested and might yield different results than expected.
Tracked diagnostic statistics:
target_log_prob
: Value of the model’s log-probabilityleapfrogs_taken
: Number of leapfrog steps taken by the integratordiverging
: Marks samples as diverging (NOTE: Handle with care, the spike-and-slab prior of scCODA usually leads to many samples being flagged as diverging)energy
: HMC “Energy” value for each steplog_accept_ratio
: log-acceptance ratiostep_size
: The step size used by the algorithm in each stepreached_max_depth
: Whether the NUTS algorithm reached the maximum sampling depth in each stepis_accepted
: Whether the proposed sample was accepted in the algorithm’s acceptance step
- Parameters
- num_results :
int
int
(default:10000
) MCMC chain length (default 10000)
- 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
- max_tree_depth :
int
int
(default:10
) Maximum tree depth (default 10)
- step_size :
float
float
(default:0.01
) Initial step size (default 0.01)
- verbose :
float
float
(default:True
) If true, a progress bar is printed during MCMC sampling
- num_results :
- Return type
- Returns
result object
result – Compositional analysis result