Pareto k parameter diagnostics

Pareto k parameter diagnostics#

Default Pareto k diagnostic plot from PSIS-LOO-CV to assess importance sampling reliability

Matplotlib version of plot_khat

Link to this page with the bokeh tab selected

Link to this page with the plotly tab selected

import warnings

from arviz_base import load_arviz_data
from arviz_stats import loo

import arviz_plots as azp

azp.style.use("arviz-variat")

dt = load_arviz_data("rugby")
warnings.filterwarnings("ignore", "Estimated shape parameter.*greater than 0.70")
elpd_data = loo(dt, var_name="home_points", pointwise=True)

pc = azp.plot_khat(
    elpd_data,
    threshold=0.7,
    visuals={"hlines": True, "bin_text": True},
    backend="none", # change to preferred backend
)

pc.show()

See also

API Documentation: plot_khat

Other examples with plot_khat#