Skip to content

Commit

Permalink
add links to NDE paper
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashergt committed Mar 12, 2024
1 parent 2a63330 commit f351caa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion anesthetic/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,8 @@ def nde_plot_1d(ax, data, *args, **kwargs):
This functions as a wrapper around :meth:`matplotlib.axes.Axes.plot`, with
a normalising flow as a neural density estimation (NDE) provided by
:class:`margarine.maf.MAF` or :class:`margarine.clustered.clusterMAF`.
See also `Bevins et al. (2022) <https://arxiv.org/abs/2205.12841>`_.
All remaining keyword arguments are passed onwards.
Parameters
Expand Down Expand Up @@ -1487,6 +1489,8 @@ def nde_contour_plot_2d(ax, data_x, data_y, *args, **kwargs):
and :meth:`matplotlib.axes.Axes.contourf` with a normalising flow as a
neural density estimator (NDE) provided by :class:`margarine.maf.MAF` or
:class:`margarine.clustered.clusterMAF`.
See also `Bevins et al. (2022) <https://arxiv.org/abs/2205.12841>`_.
All remaining keyword arguments are passed onwards to both functions.
Parameters
Expand Down Expand Up @@ -1597,7 +1601,7 @@ def nde_contour_plot_2d(ax, data_x, data_y, *args, **kwargs):
from margarine.clustered import clusterMAF

Check warning on line 1601 in anesthetic/plot.py

View check run for this annotation

Codecov / codecov/patch

anesthetic/plot.py#L1599-L1601

Added lines #L1599 - L1601 were not covered by tests

except ImportError:
raise ImportError("Please install margarine to use nde_1d")
raise ImportError("Please install margarine to use nde_2d")

Check warning on line 1604 in anesthetic/plot.py

View check run for this annotation

Codecov / codecov/patch

anesthetic/plot.py#L1603-L1604

Added lines #L1603 - L1604 were not covered by tests

if nde_clustering:
nde = clusterMAF(data, weights=w, lr=nde_lr,

Check warning on line 1607 in anesthetic/plot.py

View check run for this annotation

Codecov / codecov/patch

anesthetic/plot.py#L1606-L1607

Added lines #L1606 - L1607 were not covered by tests
Expand Down

0 comments on commit f351caa

Please sign in to comment.