freealg.distributions.FreeLevy#
- class freealg.distributions.FreeLevy(t, w, lam, a=0.0, sigma=0.0)#
Free Levy distribution.
This class extends the compound free Poisson law (
freealg.distributions.CompoundFreePoisson) by adding a drift and semicircle parts.- Parameters:
- tarray_like
Array \([t_1, \dots, t_r]\), where \(t_i\) is the jump location \(\delta_{t_i}\) in the discrete distribution \(H\) (see notes below).
- warray_like
Array \([w_1, \dots, w_r]\), where \(w_i\) is the jump weights of \(\delta_{t_i}\) in the discrete distribution \(H\) (see notes below). The sum of all weights must be one: \(\sum_{i=1}^r w_i = 1\).
- lamfloat
Total rate (intensity) \(\lambda > 0\).
- afloat, default=0.0
Shift (drift) parameter \(a\) in \(\delta_a\) (see notes below.)
- sigmafloat, default=0.0
Semicircle standard deviation \(\sigma\) (variance is \(\sigma^2\)).
Notes
General Free Levy Law:
This model is constructed by the free additive convolution of the following three laws:
\[\mu = \mu_{\delta_a} \boxplus \mu_{\mathrm{SC}_{\sigma^2}} \boxplus \mu_{\mathrm{CFP}(\lambda, H)},\]where
\(\delta_a\) is the shift \(X \mapsto X + a\) (given by the parameter
a);\(\mathrm{SC}_{\sigma^2}\) is the semicircle (free Gaussian) law with variance \(\sigma^2\) (give by the parameter
sigma);\(\mathrm{CFP}(\lambda, H)\) is the compound free Poisson law with the rate \(\lambda\) and jump \(H\), given by the R transform
\[R_{\mathrm{CFP}(\lambda, H)} = \lambda \int_{\mathbb{R}} \frac{x}{1 - wx} H(\mathrm{d} x).\]Here, \(H > 0\) is a positive measure. The free Levy distribution represents all free infinitely divisible (FID) distributions (see Theorem 13.8 in [1]).
Algebraic Free Levy Law:
In this class, we assume \(H\) is discrete atomic distribution given by
\[H = \sum_{i=1}^r w_i \delta_{t_i},\]where \(t_i>0\) are jump sizes (given by the parameter
tas a list), and \(w_i>0\) are weights with \(\sum_i w_i = 1\) (given by the parameterwas a list). This assumption on \(H\) restricts the free Levy class to algebraic FID distributions where its Stieltjes transform satisfies a polynomial constraint (see below).R transform:
The R transform the atomic free Levy law is the sum of all constituent laws
\[R = R_{\delta_a} + R_{\mathrm{SC}_{\sigma^2}} + R_{\mathrm{CFP}(\lambda, H)},\]which for atomic \(H\) becomes
\[R(w) = a + \sigma^2 w + \lambda \sum_{i=1}^r w_i \frac{t_i}{1-t_i w}.\]Stieltjes Transform:
The Stieltjes transform \(m(z)\) satisfies
\[R(-m(z)) = z + \frac{1}{m(z)}.\]Solving for \(m\) and clearing the common denominators for the rational function representation, we get a polynomial \(P(z, m) = 0\) with
\[P(z, m) = \sum_{i=1}^{d_z} \sum_{j=1}^{d_m} c_{ij} z^i m^j = 0,\]where \(d_z\) and \(d_m\) are the degrees of \(P\) in \(z\) and \(m\), respectively. The degree \(d_z\) is always 1.
For \(r\) atoms in \(H\) and \(\sigma = 0\), this yields a polynomial with degree \(d_m = r+1\) in \(m\). When \(\sigma > 0\), the polynomial is of degree \(d_m = r+2\).
When \(\sigma=0\), this model has an atom at \(x = a\) with mass \(\max(1-\lambda, 0)\).
Functions:
The coefficients \(c_{ij}\) can be obtained from
poly()function.For a given \(z\), all \(d_m\) roots (in \(m\)) of the polynomial \(P(z, m) = 0\) can be computed by
roots().Among all roots, only one root corresponds to the physical branch, known as the Stieltjes transform. This physical root can be computed by
stieltjes()function.
References
[1]Alexandru Nica and Roland Speicher (2006). Lectures on the Combinatorics of Free Probability. Cambridge University Press, LMS.
Examples
We create a free Levy distribution, plot is density and compute its support.
>>> from freealg.distributions import FreeLevy >>> # Create an object of the class >>> fl = FreeLevy(t=[2.0, 5.5], w=[0.75, 1-0.75], lam=0.1, a=0, ... sigma=0.9) >>> # Plot density >>> rho = fl.density(plot=True) >>> # Get the support intervals >>> supp = fl.support() [(-1.9990360090022503, 3.7017366841710433), (4.170457614403601, 7.886856714178547)]
We can also sample from this distribution: either as a matrix realization, or as an array of eigenvalues:
>>> # Generate a random matrix realization of this law >>> A = fl.matrix(size=2000, seed=0) >>> # Sample from eigenvalues of this law >>> eig = fl.sample(size=2000)
Here, we compute the coefficients of the polynomial \(P(z, m) = 0\), all its roots at a given point \(z\), and its physical root (Stieltjes transform):
>>> # Get the coefficients of the polynomial P(z, m) = 0 >>> coeffs = fl.poly().real array([[ 1. , 7.2125, 10.71 , 6.075 , 8.91 ], [ 0. , 1. , 7.5 , 11. , -0. ]]) >>> # Compute all roots of the polynomial at a given z >>> z = 2.0 + 3.0j >>> roots = fl.roots(z) array([-2.34243764-3.91061653e+00j, -0.50248052-2.41746562e-02j, -0.12025009+2.34338362e-01j, -0.18578573-3.25087974e-03j]) >>> # Compute the Stieltjes transform at z (the physical root) >>> m = fl.stieltjes(z) array(-0.12025009+0.23433836j)
Methods
density([x, eta, max_iter, tol, ...])Density of distribution.
roots(z[, chunk_size, eps])Roots of polynomial implicitly representing Stieltjes transform
stieltjes(z[, max_iter, tol])Stieltjes transform of distribution.
support([eta, n_probe, thr, x_max])Support intervals of distribution
sample(size[, x_min, x_max, method, seed, ...])Sample from distribution.
matrix(size[, seed])Generate matrix with the spectral density of the distribution.
poly()Polynomial coefficients implicitly representing the Stieltjes
plot_branches([x, y, latex, save])Plot branches of the spectral curve of Stieltjes transform.