spey.backends.default_pdf.simple_pdf.Poisson#
- class spey.backends.default_pdf.simple_pdf.Poisson(signal_yields: List[float], background_yields: List[float], data: List[int])[source]#
Poisson distribution without uncertainty implementation.
\[\mathcal{L}(\mu) = \prod_{i\in{\rm bins}}{\rm Poiss}(n^i|\mu n_s^i + n_b^i)\]where \(n_{s,b}\) are signal and background yields and \(n\) are the observations.
- Parameters:
signal_yields (
List[float]) – signal yieldsbackground_yields (
List[float]) – background yieldsdata (
List[int]) – data
Methods
__init__(signal_yields, background_yields, data)asimov_negative_loglikelihood([poi_test, ...])Compute negative log-likelihood at fixed \(\mu\) for Asimov data.
combine(other, **kwargs)A routine to combine to statistical models.
config([allow_negative_signal, poi_upper_bound])Model configuration.
expected_data(pars, **kwargs)Compute the expected value of the statistical model
get_hessian_logpdf_func([expected, data])Currently Hessian of \(\log\mathcal{L}(\mu, \theta)\) is only used to compute variance on \(\mu\).
get_logpdf_func([expected, data])Generate function to compute \(\log\mathcal{L}(\mu, \theta)\) where \(\mu\) is the parameter of interest and \(\theta\) are nuisance parameters.
get_objective_function([expected, data, do_grad])Objective function i.e. negative log-likelihood, \(-\log\mathcal{L}(\mu, \theta)\).
get_sampler(pars)Retreives the function to sample from.
minimize_asimov_negative_loglikelihood([...])A backend specific method to minimize negative log-likelihood for Asimov data.
minimize_negative_loglikelihood([expected, ...])A backend specific method to minimize negative log-likelihood.
negative_loglikelihood([poi_test, expected])Backend specific method to compute negative log-likelihood for a parameter of interest \(\mu\).
Attributes
datasignal_yieldsbackground_yieldsauthorAuthor of the backend
is_aliveReturns True if at least one bin has non-zero signal yield.
main_modelretreive the main model distribution
nameName of the backend
spey_requiresSpey version required for the backend
versionVersion of the backend