freealg.AlgebraicForm#

class freealg.AlgebraicForm(A, support=None, delta=1e-05, dtype='complex128', **kwargs)#

Algebraic surrogate for ensemble models.

Parameters:
Anumpy.ndarray

The 2D symmetric \(\mathbf{A}\). The eigenvalues of this will be computed upon calling this class. If a 1D array provided, it is assumed to be the eigenvalues of \(\mathbf{A}\).

supporttuple, default=None

The support of the density of \(\mathbf{A}\). If None, it is estimated from the minimum and maximum of the eigenvalues.

delta: float, default=1e-6

Size of perturbations into the upper half plane for Plemelj’s formula.

dtype{'complex128', 'complex256'}, default = 'complex128'

Data type for inner computations of complex variables:

  • 'complex128': 128-bit complex numbers, equivalent of two double precision floating point.

  • 'complex256': 256-bit complex numbers, equivalent of two long double precision floating point. This option is only available on Linux machines.

**kwargsdict, optional

Parameters for the supp() function can also be prescribed here when support=None.

Examples

>>> from freealg import AlgebraicForm
Attributes:
eignumpy.array

Eigenvalues of the matrix

supp: tuple

The predicted (or given) support \((\lambda_{\min}, \lambda_{\max})\) of the eigenvalue density.

nint

Initial array size (assuming a square matrix when \(\mathbf{A}\) is 2D).

Methods

fit(deg_m, deg_z[, reg, r, n_r, n_samples, ...])

Fit an algebraic structure to the input data.

support([coeffs, scan_range, n_scan, ...])

Estimate the spectral edges of the density.

branch_points([tol, real_tol, plot, latex, ...])

Compute global branch points.

atoms([eta, tol, real_tol, w_tol, merge_tol])

Detect atom locations and weights of distribution

density([x, eta, ac_only, plot, latex, save])

Evaluate spectral density.

hilbert([x, plot, latex, save])

Compute Hilbert transform of the spectral density.

stieltjes([x, y, plot, latex, save])

Compute Stieltjes transform of the spectral density

decompress(size[, x, method, min_n_times, ...])

Free decompression of spectral density.

is_decompressible([ratio, n_ratios, K, L, ...])

Check if the given distribution can be decompressed.

edge(t[, eta, dt_max, max_iter, tol, verbose])

Evolves spectral edges.

cusp(t_grid)

Find cusp (merge) point of evolving spectral edges

eigvalsh([size, seed])

Estimate the eigenvalues.

cond([size, seed])

Estimate the condition number.

trace([size, p, seed])

Estimate the trace of a power.

slogdet([size, seed])

Estimate the sign and logarithm of the determinant.

norm([size, order, seed])

Estimate the Schatten norm.

candidate

Candidate densities of free decompression from all possible roots