spey.backends.distributions.Normal#
- class spey.backends.distributions.Normal(loc: ndarray, scale: ndarray, weight: Callable[[ndarray], float] | float = 1.0, domain: slice = slice(None, None, None))[source]#
Normal distribution
- Parameters:
loc (
np.ndarray) – Mean of the distribution.scale (
np.ndarray) – standard deviation.weight (
Callable[[np.ndarray], float]orfloat, default1.0) – weight of the distribution.domain (
slice, defaultslice(None, None)) – set of parameters to be used within the distribution.
- __init__(loc: ndarray, scale: ndarray, weight: Callable[[ndarray], float] | float = 1.0, domain: slice = slice(None, None, None))[source]#
Methods
__init__(loc, scale[, weight, domain])expected_data()The expectation value of the Normal distribution.
log_prob(value)Compute log-probability
sample(value, sample_size)Generate samples
Attributes
weightWeight of the distribution
domainWhich parameters should be used during the computation of the pdf