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.56k stars 366 forks source link

Add resampling options for multi-Pathfinder #3242

Closed avehtari closed 6 months ago

avehtari commented 8 months 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 8 months ago

What is returned when resample is false?

avehtari commented 8 months 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 7 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 7 months ago
WardBrian commented 6 months ago

3249