stan-dev / stan

Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
2.6k stars 370 forks source link

Add resampling options for multi-Pathfinder #3242

Closed avehtari closed 10 months ago

avehtari commented 1 year ago
  1. Currently, multi-Pathfinder always resamples. When the approximation is far from the true target and especially in case of high dimensional posteriors, one weight can dominate and resampling returns only copies of a single draw. Furthermore, in edge cases, Pareto-smoothing or computation of weights can fail and produce completely unexpected results. To allow 1) further diagnostics in such problematic cases and 2) have more unique draws to initialize MCMC to improve MCMC convergence diagnostics

    • [ ] add boolean option resample with default value TRUE, and value FALSE disabling the resampling
  2. For cases where we don't care about doing further diagnostics, but want a minimum number of unique draws, allow resampling without replacement (and then set num_draws to the number of unique draws needed, e.g. for initializing MCMC)

    • [ ] add boolean option with_replacement with default value TRUE, and value FALSE using without replacement resampling
WardBrian commented 1 year ago

What is returned when resample is false?

avehtari commented 1 year ago

When resample is false, return the draws from the normal approximations (skip lines 173-186 and index with consecutive numbers on line 188 of multi.hpp)

WardBrian commented 11 months ago

I still don't think I understand how this is different from setting save_single_paths to true and using those draws

avehtari commented 11 months ago
WardBrian commented 10 months ago

3249