Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: parameter customization for maximum likelihood fits #320

Merged
merged 2 commits into from
Feb 2, 2022

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Feb 2, 2022

This adds customization to maximum likelihood fits via fit.fit:

  • initial parameter values via init_pars,
  • setting parameters to constant via fix_pars,
  • parameter bounds via par_bounds.

The names of the kwargs generally follow the pyhf naming, however fix_pars currently differs from the currently used fixed_params used in pyhf (scikit-hep/pyhf#1757). A harmonization in pyhf should probably be propagated to cabinetry as well in case it happens.

This change revealed a small type inconsistency in pyhf-provided default parameter bounds, which is being followed up in scikit-hep/pyhf#1755.

* added parameter customization options to fit.fit API
* new supported keyword arguments are init_pars, fix_pars, and par_bounds

@codecov
Copy link

codecov bot commented Feb 2, 2022

Codecov Report

Merging #320 (2198edf) into master (c1bd802) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #320   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1880      1880           
  Branches       304       304           
=========================================
  Hits          1880      1880           
Impacted Files Coverage Δ
src/cabinetry/fit/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1bd802...2198edf. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant