spey.backends.default_pdf.simple_pdf.Gaussian

spey.backends.default_pdf.simple_pdf.Gaussian#

class spey.backends.default_pdf.simple_pdf.Gaussian(signal_yields: List[float], background_yields: List[float], data: List[int], absolute_uncertainties: List[float])[source]#

Gaussian distribution for uncorrelated likelihoods.

\[\mathcal{L}(\mu) = \prod_{i\in{\rm bins}} \frac{1}{\sigma^i \sqrt{2\pi}} \exp\left[-\frac{1}{2} \left(\frac{\mu n_s^i + n_b^i - n^i}{\sigma^i} \right)^2 \right]\]

where \(n_{s,b}\) are signal and background yields and \(n\) are the observations.

Added in version 0.1.9.

Parameters:
  • signal_yields (List[float]) – signal yields

  • background_yields (List[float]) – background yields

  • data (List[int]) – data

  • absolute_uncertainties (List[float]) – absolute uncertainties on the background

__init__(signal_yields: List[float], background_yields: List[float], data: List[int], absolute_uncertainties: List[float])[source]#

Methods

__init__(signal_yields, background_yields, ...)

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

absolute_uncertainties

absolute uncertainties on the background

author

Author of the backend

background_yields

data

is_alive

Returns True if at least one bin has non-zero signal yield.

main_model

retreive the main model distribution

name

Name of the backend

signal_yields

spey_requires

Spey version required for the backend

version

Version of the backend