spey.base.model_config.ModelConfig#
- class spey.base.model_config.ModelConfig(poi_index: int, minimum_poi: float, suggested_init: List[float], suggested_bounds: List[Tuple[float, float]], parameter_names: List[str] | None = None, suggested_fixed: List[bool] | None = None)[source]#
Container to hold certain properties of the backend and statistical model. This will ensure the consistency of the computation through out the package.
- Parameters:
poi_index (
int) – index of the parameter of interest within the parameter list.minimum_poi (
float) –minimum value parameter of interest can take to ensure \(N^{\rm bkg}+\mu N^{\rm sig}\geq0\). This value can be set to \(-\infty\) but note that optimiser will take it as a lower bound so such low value might effect the convergence of the optimisation algorithm especially for relatively flat objective surfaceses. Hence we suggest setting the minimum value to
\[\mu_{\rm min} = - \min\left( \frac{N^{\rm bkg}_i}{N^{\rm sig}_i} \right)\ ,\ i\in {\rm bins}\]suggested_init (
List[float]) – suggested initial parameters for the optimiser.suggested_bounds (
List[Tuple[float, float]]) – suggested parameter bounds for the optimiser.
- Returns:
obj:~spey.base.model_config.ModelConfig: Model configuration container for optimiser.
- __init__(poi_index: int, minimum_poi: float, suggested_init: List[float], suggested_bounds: List[Tuple[float, float]], parameter_names: List[str] | None = None, suggested_fixed: List[bool] | None = None) None#
Methods
__init__(poi_index, minimum_poi, ...[, ...])change_parameter_names(name_map)Change the parameter names
fixed_poi_bounds([poi_value])Adjust the bounds for the parameter of interest for fixed POI fit.
fixed_poi_bounds_multi([poi_values])Adjust bounds for multiple fixed parameters.
rescale_poi_bounds([allow_negative_signal, ...])Rescale bounds for POI.
resolve_poi_indices(poi_test)Resolve
poi_testto a mapping of{parameter_index: fixed_value}.Attributes
nparNumber of parameters
parameter_namesNames of the parameters
suggested_fixedSuggested fixed values
poi_indexIndex of the parameter of interest wihin the parameter list
minimum_poiminimum value parameter of interest can take to ensure \(N^{\rm bkg}+\mu N^{\rm sig}\geq0\).
suggested_initSuggested initialisation for parameters
suggested_boundsSuggested upper and lower bounds for parameters