Lévy Noise (Skewed Stable Random Variable Generator)¶
New in version 0.5.
This function generates random variable with Levy alpha-stable distribution (also reffered just as stable distribution).
The Levy distribution is defined by two parameters \(\alpha\) and \(\beta\). The Gaussian distribution is special case of Levy distribution with \(\alpha=2\) and \(\beta=0\).
Notes about Implementation¶
The implemented algorithm is known as Chambers-Mallows-Stuck method [1]. Using two random variables (one with exponential distribution and one with uniform distribution). The input random variables are obtained with numpy.random.exponentinal and numpy.random.uniform.
Example Usage¶
The following example produce 1000 samples of Levy noise located (mean value) at -2 (position), with characteristic exponent index of 1.5 (alpha), skeewness of 1 (beta) and diffusion of 1. (sigma).
import signalz
x = signalz.levy_noise(1000, alpha=1.5, beta=0.5, sigma=1., position=-2)
References¶
[1] | Rafał Weron. On the chambers-mallows-stuck method for simulating skewed stable random variables. Statistics & probability letters, 28(2):165–171, 1996. |
Function Documentation¶
-
signalz.generators.levy_noise.
levy_noise
(n, alpha=2.0, beta=1.0, sigma=1.0, position=0.0)[source]¶ This function produces Levy noise.
Args:
- n - length of the output data (int) - how many samples will be on output
Kwargs:
- alpha - characteristic exponent index (float) in range 0<alpha<2
- beta - skeewness (float) in range -1<beta<1
- sigma - diffusion (float), in case of gaussian distribution it is standard deviation
- position - position parameter (float)
Returns:
- vector of values representing the noise (1d array)