Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 20, 2023
1 parent 8bcbb8d commit 7a9918c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions examples/binning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@
"num_bins = 5\n",
"pars = jnp.linspace(0, 8, num_bins + 1)\n",
"\n",
"\n",
"# differentiable significance pipeline\n",
"def asimov_pipe(bins, s, b, bandwidth=1e-2):\n",
" # restrict bin edges so they don't overlap during optimisation\n",
Expand Down Expand Up @@ -1394,6 +1395,7 @@
"\n",
"from copy import deepcopy\n",
"\n",
"\n",
"# specify the workspace for a simple model with a three-point background systematic\n",
"def correlated_background(signal, bkg, bkg_up, bkg_down):\n",
" spec = {\n",
Expand Down Expand Up @@ -1430,6 +1432,7 @@
"\n",
"from pyhf import interpolators\n",
"\n",
"\n",
"# pipeline to calculate the full CLs for the model, given a number of bins\n",
"def pipe(num_bins):\n",
" def cls_pipe(bins, s, b, bup, bdown, bandwidth=1e-2, skeleton_model=None):\n",
Expand Down
1 change: 1 addition & 0 deletions examples/cuts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@
"from jaxopt import OptaxSolver\n",
"from optax import adam\n",
"\n",
"\n",
"# define something to minimise (1/significance)\n",
"def loss(cut):\n",
" s_weights = relaxed.cut(sig, cut, slope) + 1e-4\n",
Expand Down
1 change: 0 additions & 1 deletion examples/neos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@
" scale_factors: dict[str, float],\n",
" include_bins: bool = True,\n",
") -> tuple[Array, dict[str, list]]:\n",
"\n",
" loss = partial(\n",
" pipeline,\n",
" nn=nn,\n",
Expand Down
1 change: 0 additions & 1 deletion examples/simple-analysis-optimisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"source": [
"# our analysis pipeline, from phi to p-value\n",
"def pipeline(phi, return_yields=False, uncertainty=True):\n",
"\n",
" # grab the yields at the value of phi we want\n",
" y = yields(phi, uncertainty=uncertainty)\n",
"\n",
Expand Down

0 comments on commit 7a9918c

Please sign in to comment.