ParameterSensitivityEstimator#
- class gammapy.estimators.ParameterSensitivityEstimator[source]#
Bases:
object
Estimate the sensitivity to a given parameter.
Computes the TS distribution in the non-null hypothesis using the log likelihood of the Asimov dataset (i.e. a dataset with counts = npred) and the non-central chi2 distribution. Once the TS distribution under the testing hypothesis is known, one can compute the required parameter value to have 50% of measurements above a given significance threshold.
- Parameters:
- parameter
Parameter
Parameter to test
- null_valuefloat or
Parameter
Value of the parameter for the null hypothesis.
- n_sigmafloat, optional
Number of required significance level. Default is 5.
- n_free_parametersint, optional
Number of free parameters. Default is None, which utilises len(parameters).
- rtolfloat, optional
Relative precision of the estimate. Used as a stopping criterion. Default is 0.01.
- max_niterint, optional
Maximal number of iterations used by the root finding algorithm. Default is 100.
- parameter
References
Attributes Summary
Methods Summary
parameter_matching_significance
(datasets)Parameter value matching the target significance.
run
(datasets)Run the parameter sensitivity estimator.
Attributes Documentation
- tag = 'ParameterSensitivityEstimator'#
Methods Documentation
- parameter_matching_significance(datasets)[source]#
Parameter value matching the target significance.
- run(datasets)[source]#
Run the parameter sensitivity estimator.
- Parameters:
- datasets
Datasets
The datasets used to estimate the parameter sensitivity.
- datasets
- Returns:
- resultfloat
Parameter sensitivity given as the difference between the value matching the target significance and the null value.
- __init__(parameter, null_value, n_sigma=5, n_free_parameters=None, rtol=0.01, max_niter=100)[source]#
- classmethod __new__(*args, **kwargs)#