Skip to content

Commit

Permalink
explain need for normalizing in DemoReweighting notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
goi42 authored and arogozhnikov committed Apr 3, 2024
1 parent 4f84409 commit 442a321
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions notebooks/DemoReweighting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down

0 comments on commit 442a321

Please sign in to comment.