Lévy Walk

New in version 0.5.

This function generates Levy walk by interpolation of Levy flight.

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\).

This function uses Lévy Noise (Skewed Stable Random Variable Generator).

Example Usage

The following example produce 1000 samples of Levy walk created from 500 samples of Levy noise (ns=500) located (mean value) at 0 (position), with characteristic exponent index of 1.4 (alpha), skeewness of 0 (beta) and diffusion of 1. (sigma).

import signalz
x = signalz.levy_walk(1000, ns=500, alpha=1.4, beta=0., sigma=1., position=0)

Function Documentation

signalz.generators.levy_walk.levy_walk(n, ns=0, alpha=2.0, beta=1.0, sigma=1.0, position=0.0)[source]

This function produces Levy walk.

Args:

  • n - length of the output data (int) - how many samples will be on output
  • ns - number of points (int) in original noise before interpolation, this number cannot be higher than desired length of data; if it is set to 0, then ns=n is used; this number is related to number of direction changes in resulting walk

Kwargs:

  • alpha - characteristic exponent index of used Levy noise (float) in range 0<alpha<2
  • beta - skeewness of used Levy noise (float) in range -1<beta<1
  • sigma - diffusion of used Levy noise (float); in case of gaussian distribution it is standard deviation
  • position - position parameter (float) of used Levy noise

Returns:

  • vector of values representing the walk (1d array)