-
Notifications
You must be signed in to change notification settings - Fork 16
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
Normalising Flows as NDEs for production-grade plots #334
Comments
Hi @htjb, in principle this is a pretty easy addition. The only thing that needs to be got right is the computation of the level sets for the contours (for which the example in anesthetic.plot.kde_contour_plot_2d shows the right way to do it with iso_probability_contours. To plumb this in, you would need to create something akin to (i.e. in large part copy-paste)
and adjust:
It's this messy in order to give us pandas-like plotting functionality (e.g. In general a `grep -ri kde anesthetic tests' will show you most of what needs to be adjusted. |
Nice, this sounds good! I remember playing with |
Had a brief discussion with @williamjameshandley offline about using normalizing flows (NFs) as Neural Density Estimators (NDEs) instead of KDEs for production-grade anesthetic plots. I've been doing some work recently that shows that NFs typically out-perform KDEs when used to estimate the KL divergence/BMD of target distributions. This suggests that they can be used to better represent the underlying samples in a distribution for production grade plots.
We would like to add a
kind=nde
option to the plotting functionality inanesthetic
and integrate inmargarine
for NF training. A simple example is shown below.Which produces the following plot
For multi-modal distributions we can take advantage of the clustering built into
margarine
. The flows take seconds to minutes to train depending on number of samples and dimensionality.The text was updated successfully, but these errors were encountered: