aub_htp.multivariate_alpha_stable_gen#

class aub_htp.multivariate_alpha_stable_gen(seed=None)#

Bases: multi_rv_generic

Multivariate alpha stable distribution generator.

This class provides the SciPy-compatible rvs interface for sampling multivariate alpha-stable law, and a pdf wrapper that caches the last computed density model so repeated evaluations reuse expensive internal precomputations.

__init__(seed=None)#

Methods

__init__([seed])

rvs(alpha[, spectral_measure_sampler, ...])

Sample from a multivariate alpha stable distribution.

Attributes

random_state

Get or set the Generator object for generating random variates.

pdf(x: ArrayLike, alpha: float, spectral_measure_sampler: BaseSpectralMeasureSampler | Literal['standard_isotropic_2d', 'standard_isotropic_3d', '1x2_elliptic_2d', '1x2x4_elliptic_3d', 'coin_flip_discrete'] = 'standard_isotropic_2d', shift: ArrayLike = 0.0, number_of_spectral_samples: int = 200000, number_of_sphere_points: int | None = None, random_state: None | int | RandomState | Generator = None, exact: bool = False, sphere_method: str = 'sobol', antipodal: bool = False) NDArray#

Evaluate the multivariate alpha-stable density at point(s) x.

The method reuses the last computed internal density model when the pdf parameters are identical to the previous call. This preserves the costly MultivariateStableDensity setup for repeated evaluations.

rvs(alpha: float, spectral_measure_sampler: BaseSpectralMeasureSampler | Literal['standard_isotropic_2d', 'standard_isotropic_3d', '1x2_elliptic_2d', '1x2x4_elliptic_3d', 'coin_flip_discrete'] = 'standard_isotropic_2d', shift: ndarray = 0, size: int | None = None, error: float = 0.01, random_state: None | int | RandomState | Generator = None)#

Sample from a multivariate alpha stable distribution.

Parameters#

alphafloat

The alpha parameter of the alpha stable distribution.

spectral_measure_samplerBaseSpectralMeasureSampler or str

The spectral measure sampler to use.

shiftnp.ndarray

The shift vector to apply to the samples.

sizeint or tuple of ints, optional

Defines the shape of the returned array. Default is 1.

random_stateint or None, optional

Random state to use for the random number generator.

Returns#

samplesndarray

Samples from the multivariate alpha stable distribution.

Raises#

ValueError

If the spectral measure sampler is not supported.