-
-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Implement importance weighted moment matching #2136
Comments
This could push #2086 over the line, and unblock both this feature and #2040 Does this feature actually need two functions for computing posterior density and a constraining bijector, or does it suffice to be able to match unconstrained draws to the constrained draws, and map the constrained draws to the density? I guess I'm wondering if you need to compute density for novel points, and to constrain novel points. My own opinion is that if you need these functions in addition to the InferenceData, it might be better as a standalone library (possibly under |
In most cases, the posterior is acting as a proposal distribution for the importance sampling. The IWMM algorithm adapts the posterior draws (working in unconstrained space). It transforms these draws and calculates the density ratio for these new draws to arrive at a better proposal (this may involve calculating the log posterior density of the newly transformed draws). Once the algorithm finishes, we would want to constrain the transformed draws before calculating expectations with the importance weights. So, I think, yes we would need to be able to calculate the posterior density for new (unconstrained) points, and also constrain these new points. |
Description
Importance weighted moment matching (IWMM) is an implicitly adaptive importance sampling method that improves proposal distributions in importance sampling by performing affine transformations on the proposal draws. This can be used in e.g. loo-cv or power-scaling sensitivity analysis, when Pareto-smoothed importance sampling is not stable.
The paper describing the method is available here: https://link.springer.com/article/10.1007/s11222-020-09982-2 and a reference method is implemented in R: https://github.com/topipa/iwmm
The loo R package (https://github.com/stan-dev/loo) also has an implementation.
Thoughts on implementation
In order to run IWMM, I think the following are required:
I'm happy to help with this, as I have been working with the R code and translating it should not be too hard, however I'm unsure of the best approach to get access to the above requirements (as they aren't usually in an InferenceData object)
The text was updated successfully, but these errors were encountered: