_affine module

class pyrockfall.stats._affine.Affine(base: Distribution, scale: float = 1.0, translate: float = 0.0)[source]

Bases: Distribution

Runtime wrapper applying Y = scale * X + translate to a base Distribution. - Preserves the base DistID (wrappers are not registered).

DistID: DistributionID = 0
rvs(size: int = 1, random_state=None) → ndarray[source]

Random variates

pdf(y) → ndarray[source]

Probability density function

cdf(y) → ndarray[source]

Cumulative distribution function

ppf(q) → ndarray[source]

Percent point function (inverse of cdf)

expect(func: Callable, lb: float = -inf, ub: float = inf) → float[source]

Expected value of a function of the random variable over [lb, ub]

median() → float[source]

Median of the distribution

mean() → float[source]

Mean of the distribution

var() → float[source]

Variance of the distribution

interval(confidence: float = 1.0) → Tuple[float, float][source]

Confidence interval having equal areas around the median

native_params() → dict[str, float][source]

Constructor-ready, family-specific parameters (e.g., {‘mu’:…, ‘sigma’:…}).

generic_params() → DistributionParameters[source]

Family-agnostic summary: loc, scale, rel_min, rel_max