freealg.AlgebraicForm.cusp#
- AlgebraicForm.cusp(t_grid, kind='free', supp=None, max_iter=50, tol=1e-12, dedup_t_tol=1e-06, dedup_x_tol=1e-06, return_info=False)#
Find cusp (merge/split) point of evolving spectral edges.
- Parameters:
- t_gridarray_like
A time grid to search for cusp points.
- 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.
- supplist, default=None
Estimated support of density as a list of tuples. If not given, support is estimated from the fitted polynomial.
- max_iterint, default=50
Maximum number of Newton iterations
- tolfloat, default=1e-12
Tolerance in Newton root finding method
- dedup_t_tolfloat, default=1e-6
Tolerance along t axis to identify duplicity (de-duplication.)
- dedup_x_tolfloat, default=1e-6
Tolerance along x axis to identify duplicity (de-duplication.)
- return_infobool, default=False
If True, a list of debugging information per each cusp point is returned.
- Returns:
- cuspslist
A list of tuples
(x, t)of the locationxand timetof cusp points.- infolist
A list of dictionaries, each contain the debugging information for a cusp point. This is returned if
return_infois set to True.
See also
Examples
>>> import numpy >>> 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=6000, seed=0) >>> # Compress the matrix to smaller size >>> As = submatrix(A, size=1000) >>> # Create AlgebraicForm and fit the smaller matrix >>> af = AlgebraicForm(As) >>> af.fit(deg_m=3, deg_z=1) >>> # Find cusp points >>> t_final = numpy.log(A.shape[0] / As.shape[0]) >>> t = numpy.linspace(0, t_final) >>> cusps = af.cusp(t)