pyhf icon indicating copy to clipboard operation
pyhf copied to clipboard

WIP: getting suggested_init without user config overrides

Open kratsg opened this issue 4 years ago • 4 comments

Description

Just a quick idea. Normally, the suggested_init will often provide information about the default parameter settings, however this doesn't necessarily work when a user overrides these inits. This provides a way to get an init that does not necessarily depend on the user configs. Just an idea.

Checklist Before Requesting Reviewer

  • [ ] Tests are passing
  • [ ] "WIP" removed from the title of the pull request
  • [ ] Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • [ ] Summarize commit messages into a comprehensive review of the PR

kratsg avatar May 20 '21 20:05 kratsg

perhaps allowing suggested_init() to have a keyword argument to handle flipping would work:

  • ignore_config
  • ignore_user_config
  • for_asimov

kratsg avatar May 20 '21 20:05 kratsg

Codecov Report

Merging #1470 (87fa099) into master (70f100c) will decrease coverage by 0.06%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1470      +/-   ##
==========================================
- Coverage   97.65%   97.58%   -0.07%     
==========================================
  Files          63       63              
  Lines        4006     4015       +9     
  Branches      565      565              
==========================================
+ Hits         3912     3918       +6     
- Misses         55       58       +3     
  Partials       39       39              
Flag Coverage Δ
contrib 25.60% <66.66%> (+0.09%) :arrow_up:
unittests 97.35% <66.66%> (-0.07%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pyhf/parameters/paramsets.py 94.73% <66.66%> (-5.27%) :arrow_down:

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 70f100c...87fa099. Read the comment docs.

codecov[bot] avatar May 20 '21 20:05 codecov[bot]

Why this is interesting: it could be used to build (pre-fit) Asimov datasets even if users provide non-default initial values for constrained parameters. It may be interesting to (optionally?) pick up non-default inits for unconstrained parameters anyway.

alexander-held avatar May 20 '21 21:05 alexander-held

if with maximal_pars you mean the par value that maximizes the cconstraint pdf, i'd rather call this mode_values() perhaps

lukasheinrich avatar Oct 17 '21 18:10 lukasheinrich