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

WIP: getting suggested_init without user config overrides #1470

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/pyhf/parameters/paramsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def __init__(self, **kwargs):
f'misconfigured parameter set {self.name}. Scalar but N>1 parameters.'
)

@property
def maximal_pars(self):
return self.suggested_init


class unconstrained(paramset):
def __init__(self, **kwargs):
Expand Down Expand Up @@ -54,6 +58,10 @@ def width(self):
except AttributeError:
return [1.0] * self.n_parameters

@property
def maximal_pars(self):
return [0.0] * self.n_parameters


class constrained_by_poisson(constrained_paramset):
def __init__(self, **kwargs):
Expand All @@ -71,3 +79,7 @@ def width(self):
).tolist()
except AttributeError:
raise RuntimeError('need to know rate factor to compu')

@property
def maximal_pars(self):
return [1.0] * self.n_parameters