freealg.AlgebraicForm.candidates#

AlgebraicForm.candidates(size, kind='free', x=None, eig=None, delta=None, markersize=1, ylim=None, latex=False, verbose=False)#

Candidate densities of free decompression from all possible roots

Parameters:
sizeint

The size of matrix to compute the candidate roots of its spectral curve.

kind{'free', 'deformed'}, default= 'free'

The type of operation:

  • 'free': evolve the spectral curve using free decompression

  • 'deformed': evolve the spectral curve using deformed deformation.

xarray_like of float, shape (N,)

1D array of real x-values (evaluation grid).

eignumpy.array, default=None

Eigenvalues to plot as histogram.

deltafloat, optional

Small positive imaginary offset used to evaluate \(m(x + i \delta)\). If None, the delta attribute of the object is used.

markersizefloat, default=3

Marker size of scatter plot.

ylimtuple, default=None

Limits of the y axis. If None, it will be automatically set.

latexbool, default=False

If True, the plot is rendered using LaTeX.

verbosebool, default=False

If True, it prints verbose be bugging information.

See also

density

Notes

Roots are solved from the relation:

\[P(z, m) = \sum_{i=1}^I \sum_{j=1}^J a_{i, j} z^i m^j,\]

where \(m(z)\) is defined implicitly by \(P(z, m(z)) = 0\).

For each grid point \(x_k\), set \(z = x_k + i \delta\), form the polynomial in \(m\) given by \(P(z, m) = 0\), solve for its roots, and plot the cloud of candidate densities:

\[\frac{1}{\pi} \Im(m_{\mathrm{root}}),\]

keeping only roots with \(\Im(m_{\mathrm{root}}) > 0\) (roots are not tracked/paired across x-values).

Examples

>>> from freealg import AlgebraicForm
>>> from freealg.distributions import CompoundFreePoisson
>>> from freealg import submatrix

>>> # Create a distribution with two bulks
>>> cfp = CompoundFreePoisson(t=[2.0,  5.5], w=[0.75, 0.25],
...                           lam=0.1)

>>> # Get a matrix realization of the distribution
>>> A = cfp.matrix(size=4000, seed=0)

>>> # Compress the matrix to smaller size
>>> As = submatrix(A, size=2000)

>>> # Create AlgebraicForm and fit the smaller matrix
>>> af = AlgebraicForm(As)
>>> af.fit(deg_m=3, deg_z=1)

>>> # Plot all candidate roots at the decompressed size 4000
>>> af.candidates(size=4000)