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], absolute_uncertainties: List[float] | None = None)[source]#
Pure Poisson likelihood (
default.poisson).The simplest possible statistical model: no systematic uncertainties, no constraint model. The likelihood is a product of independent Poisson terms,
\[\mathcal{L}(\mu) = \prod_{i=1}^{N} \mathrm{Poiss}\!\left(n^{\rm obs}_i \,\big|\, \mu n^s_i + n^b_i\right),\]where \(n^s_i\), \(n^b_i\), and \(n^{\rm obs}_i\) are the signal yield, background yield, and observed count in bin \(i\) respectively.
Optional background uncertainties
When
absolute_uncertaintiesis provided, unconstrained per-bin nuisance parameters \(\theta_i\) are added to the expected count:\[\mathcal{L}(\mu, \boldsymbol{\theta}) = \prod_{i=1}^{N} \mathrm{Poiss}\!\left(n^{\rm obs}_i \,\big|\, \mu n^s_i + n^b_i + \theta_i \sigma_i\right).\]Note
These nuisance parameters are unconstrained (no Gaussian penalty is applied). For constrained nuisances see
UncorrelatedBackground.The positivity constraint \(n^b_i + \theta_i \sigma_i \geq 0\) is enforced via
NonlinearConstraint.- Parameters:
signal_yields (
List[float]) – Per-bin signal yields \(\{n^s_i\}\).background_yields (
List[float]) – Per-bin expected background yields \(\{n^b_i\}\).data (
List[int]) – Per-bin observed counts \(\{n^{\rm obs}_i\}\).absolute_uncertainties (
List[float], defaultNone) – Per-bin absolute background uncertainties \(\{\sigma_i\}\). When provided, the model gains \(N\) additional unconstrained nuisance parameters.
- __init__(signal_yields: List[float], background_yields: List[float], data: List[int], absolute_uncertainties: List[float] | None = None)[source]#
Methods
__init__(signal_yields, background_yields, data)asimov_negative_loglikelihood([poi_test, ...])Compute the profiled negative log-likelihood at fixed \(\mu\) on Asimov data.
combine(other, **kwargs)Combine this statistical model with another backend instance.
config([allow_negative_signal, poi_upper_bound])Model configuration.
expected_data(pars, **kwargs)Compute the expected data vector \(\{\lambda_i(\mu)\}\) at the given parameter point.
get_hessian_logpdf_func([expected, data])Return a callable that evaluates the Hessian of \(\ln\mathcal{L}(\mu)\).
get_logpdf_func([expected, data])Return a callable that evaluates \(\ln\mathcal{L}(\mu)\).
get_objective_function([expected, data, do_grad])Return the objective function \(-\ln\mathcal{L}(\mu)\) used by the optimiser.
get_sampler(pars)Return a callable that draws pseudo-data from the main model.
minimize_asimov_negative_loglikelihood([...])Find the global minimum of the negative log-likelihood on Asimov data (free fit).
minimize_negative_loglikelihood([expected, ...])Find the global minimum of the negative log-likelihood (free fit).
negative_loglikelihood([poi_test, expected])Compute the profiled negative log-likelihood at a fixed \(\mu\).
Attributes
datasignal_yieldsbackground_yieldsauthorAuthor of the backend
is_aliveReturns True if at least one bin has non-zero signal yield.
main_modelMain model distribution — Poisson (or Gaussian) term of the likelihood.
nameName of the backend
spey_requiresSpey version required for the backend
versionVersion of the backend
constraintsConstraints to be used during optimisation process
n_signal_parametersNumber of signal parameters