bartz.testing.Distr¶
- class bartz.testing.Distr[source]¶
Family of standardized distributions: mean 0, variance 1.
- abstract property kurtosis: Float[Array, ''] | float[source]¶
Fourth moment
E[z ** 4]of the standardized draws.
- abstractmethod sample(key, shape)[source]¶
Sample i.i.d. standardized values.
- Return type:
Float[Array, '*shape']
- abstractmethod quantize(x, max_bins)[source]¶
Quantize values elementwise into equal-probability bins.
- Parameters:
x (
Float[Array, '*shape']) – Values drawn from the distribution, of any shape.max_bins (
int) – Maximum number of levels.
- Returns:
quantized_x (UInt[Array, ‘*shape’]) – The bin indices, in
[0, m).m (Integer[Array, ‘’] | int) – The number of levels,
<= max_bins.
- abstractmethod ppf(u)[source]¶
Quantile function mapping probabilities in [0, 1] to standardized values.
- Return type:
Float[Array, '*shape']
- from_standard_normal(z)[source]¶
Map standard-Normal draws to this family, preserving their Gaussian copula.
Elementwise
ppf(Phi(z)): each output is marginally a draw from this family (mean 0, variance 1) while the joint dependence ofzcarries over as a Gaussian copula.Normaloverrides this with the identity.- Return type:
Float[Array, '*shape']