spey.backends.distributions.MainModel#
- class spey.backends.distributions.MainModel(loc: Callable[[ndarray], ndarray])[source]#
Main statistical model, modelled as Poisson distribution which has a variable lambda.
- Parameters:
loc (
Callable[[np.ndarray], np.ndarray]
) – callable function that represents lambda values of poisson distribution. It takes nuisance parameters as input.
Methods
__init__
(loc)expected_data
(pars)The expectation value of the main model.
log_prob
(pars, data)Compute log-probability
sample
(pars, sample_size)Generate samples