From 442a3212d6222696e9fe3386b14084bb15abd696 Mon Sep 17 00:00:00 2001 From: "Michael K. Wilkinson" Date: Wed, 3 Apr 2024 12:26:03 -0400 Subject: [PATCH] explain need for normalizing in DemoReweighting notebook --- notebooks/DemoReweighting.ipynb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notebooks/DemoReweighting.ipynb b/notebooks/DemoReweighting.ipynb index f7d68e8..a7a4570 100644 --- a/notebooks/DemoReweighting.ipynb +++ b/notebooks/DemoReweighting.ipynb @@ -144,6 +144,14 @@ " weights1=new_original_weights, weights2=numpy.ones(len(target), dtype=float)))" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Notice:\n", + "Setting `density=True` in `hist_settings` above means that the histograms will be drawn normalized below, so that the area under each histogram integrates to 1. This can obscure the fact that the weights produced by `predict_weights` are not normalized; if you want the number of effective events to be the same after reweighting, you must renormalize the weights manually--see the `reweight` documentation.\n" + ] + }, { "cell_type": "markdown", "metadata": {},