stan icon indicating copy to clipboard operation
stan copied to clipboard

Implement automatic selection of dense/diag metric at warmup

Open bbbales2 opened this issue 6 years ago • 2 comments

Summary:

Implement the automatic selection between metric=dense_e and metric=diag_e as described in: https://arxiv.org/abs/1905.11916

Description

It's not always obvious when the diagonal or dense metrics are the best. Or even if it's obvious that a dense metric will be good eventually, early in warmup the proposed metrics might not be so great.

This change will, at the end of each warmup stage where the metric is recomputed, decide whether to use a dense or diagonal metric for the next warmup stage (or for the sampling) automatically.

Current Version:

v2.20.0

bbbales2 avatar Sep 11 '19 19:09 bbbales2

Is this issue for the sampler and a services function?

Could you explain where the sampler functionality will go and how the new services function will differ from our existing dense and diagonal service functions.

bob-carpenter avatar Sep 12 '19 09:09 bob-carpenter

Is this issue for the sampler and a services function?

Both and also whatever needs to happen with cmdstan.

Could you explain where the sampler functionality will go and how the new services function will differ from our existing dense and diagonal service functions.

I made a third metric option in cmdstan ('auto'). I made a new service function here: https://github.com/stan-dev/stan/blob/88225d08e30636073a310e9cc4eefc97e5212dbf/src/stan/services/sample/hmc_nuts_auto_e_adapt.hpp

To give some idea of what changed, the changed file list is:

src/stan/mcmc/auto_adaptation.hpp 
src/stan/mcmc/hmc/hamiltonians/auto_e_metric.hpp 
src/stan/mcmc/hmc/hamiltonians/auto_e_point.hpp 
src/stan/mcmc/hmc/nuts/adapt_auto_e_nuts.hpp 
src/stan/mcmc/hmc/nuts/auto_e_nuts.hpp 
src/stan/mcmc/stepsize_auto_adapter.hpp
src/stan/services/sample/hmc_nuts_auto_e_adapt.hpp 

bbbales2 avatar Sep 12 '19 12:09 bbbales2