spey.backends.distributions.Normal

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] or float, default 1.0) – weight of the distribution.

  • domain (slice, default slice(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

weight

Weight of the distribution

domain

Which parameters should be used during the computation of the pdf