pyhf / pyhf-validation Goto Github PK
View Code? Open in Web Editor NEWValidation utilities for HistFactory workspaces
License: Apache License 2.0
Validation utilities for HistFactory workspaces
License: Apache License 2.0
While doing the validation for the displaced slepton analysis, it was found that it would be helpful to fix the mu_Sig parameter to 0 to do a bkg-only fit when comparing the fitted nuisance params in compare_fitted_nuisance.py . To do so, the following mods were needed:
line 58: bestfit = pyhf.infer.mle.fit(data, model)
--> bestfit = pyhf.infer.mle.fixed_poi_fit(0.0, data, model)
After line 25: workspace.var('mu_Sig').setVal(0.0)
One of the steps for validating pyhf against ROOT is comparing nuisance parameters, which unfortunately involves some translation of the NP names.
To that end, it looks like one of these duplicated lines should be for "shape" systematics.
https://github.com/pyhf/pyhf-validation/blob/master/scripts/compare_nuisance.py#L37-L38
In my specific use case, this did the trick (but not sure how robust this is for other workspaces):
.replace("gamma_shape_", "shape_")
Transferring some information and ideas from a developer chat with @kratsg:
pyhf-validation spec.json
that will run pyhf cls
over spec.json
and additionally runs json2xml
+hist2workspace
+run_single.py
on the resulting ROOT workspace from the HistFactory side.
delta, pyhf_out, hifa_out = pyhf-validation.run_validation("spec.json")
try import ROOT; except foo
)In the CI
pyhf-validation/tests/test_cli.py
Lines 6 to 16 in a75fe22
will often fail as it will take longer than 1 second for test_version
to complete but only on MacOS. I am not sure why it is only MacOS, but this should be resolved.
c.f. PR #9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.