tpapp / DynamicHMC.jl

Implementation of robust dynamic Hamiltonian Monte Carlo methods (NUTS) in Julia.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add mean tree depth to NUTS_tuned

itsdfish opened this issue · comments

commented

Hi Tamas-

I am using DynamicHMC v1.0.6 and would like to report mean tree depth for MCMCBenchmarks.jl. As far as I can tell, NUTS_tuned only reports the maximum tree depth. Would it be possible to add mean tree depth to NUTS_tuned? Thanks.

The .depth field of the stats for each tree should contain this information. The 2.0 API (cf #69) should make this more explicit,

results = mcmc_with_warmup(rng, p, 1000)
mean(s -> s.depth, results.tree_statistics)

should do what you want. Cf TreeStatisticsNUTS and how DynamicHMC.Diagnostics.summarize_tree_statistics extracts the depth information.

This is all on master, which is released soon. If you want to stick with 1.0.6 for now, the same information is in chain in

chain, _ = NUTS_init_tune_mcmc(...)
commented

Thank you. Sorry for the false alarm.

No worries. It is totally fine to ask support questions in issues and I am happy to help.