dymad.sako.sako

Functions

clip_eig(M[, tol])

Clip small eigenvalues in the matrix.

Classes

SAKO(P0, P1[, W, reps, etol])

Spectral Analysis for Koopman Operators

class dymad.sako.sako.SAKO(P0, P1, W=None, reps=1e-10, etol=1e-13)

Bases: object

Spectral Analysis for Koopman Operators

The implementation of the spectral analysis algorithms for Koopman operators from Colbrook et al.

The formulation is based on the following convention: Psi_0 A = Psi_1 where A is the finite-dimensional approximation of Koopman operator, Psi’s are data matrices with each row containing one time step.

Parameters:
  • P0 (np.ndarray) – Psi_0

  • P1 (np.ndarray) – Psi_1

  • W (np.ndarray) – Weights for the inner product, default is identity matrix

  • reps (float) – Threshold for the imaginary part of the residual, default is 1e-10

  • etol (float) – Tolerance for clipping small eigenvalues in the inner product matrices, default is 1e-13

estimate_measure(fobs, order, eps, thetas=101)

Estimate the spectral measure associated with a given scalar observable using a kernel of rational function.

Parameters:
  • fobs (np.ndarray) – Observable function evaluated at X0. Assuming 1D array

  • order (int) – Order of the rational kernel

  • eps (float) – Smoothing parameter of the rational kernel

  • thetas (Union[int, np.ndarray]) – The thetas at which to evaluate the measure; if int, a uniform grid is generated.

Return type:

tuple[ndarray, ndarray]

estimate_residual(ls, gs)

Wrapper of _residual_G and _residual_r for a batch of eigenpairs

Parameters:
  • ls (np.ndarray) – Array of eigenvalues

  • gs (np.ndarray) – Array of right eigenvectors, column wise

Return type:

ndarray

solve_eig()

Solve the generalized eigenvalue problem to obtain the eigenpairs.

dymad.sako.sako.clip_eig(M, tol=1e-13)

Clip small eigenvalues in the matrix.