spey.backends.distributions.MainModel#
- class spey.backends.distributions.MainModel(loc: Callable[[ndarray], ndarray], cov: ndarray | None = None, pdf_type: Literal['poiss', 'gauss', 'multivariategauss'] = 'poiss')[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.
- __init__(loc: Callable[[ndarray], ndarray], cov: ndarray | None = None, pdf_type: Literal['poiss', 'gauss', 'multivariategauss'] = 'poiss')[source]#
Methods
__init__
(loc[, cov, pdf_type])expected_data
(pars)The expectation value of the main model.
log_prob
(pars, data)Compute log-probability
sample
(pars, sample_size)Generate samples
Attributes
pdf_type
Type of the PDF