compute_logistic_map_eig

kooplearn.datasets.compute_logistic_map_eig(M: int = 10, eval_right_on: ndarray | None = None, num_components: int = -1, precomputed_transition_matrix: ndarray | None = None) ndarray | tuple[ndarray, ndarray][source]

Compute eigenvalues and eigenfunctions of the Transfer operator.

The Transfer operator for the noisy logistic map with trigonometric noise has eigenfunctions that can be computed analytically using a basis of trigonometric functions.

Parameters:
  • M (int, optional) – Order of the trigonometric noise distribution. This determines the number of basis functions used (2M + 1). Default is 10.

  • eval_right_on (np.ndarray or None, optional) – Data points on which to evaluate the right eigenfunctions. If None, right eigenfunctions are not evaluated. Default is None.

  • num_components (int, optional) – Number of dominant eigenvalues and corresponding eigenfunctions to return. If -1, all available components are returned. Default is -1.

  • precomputed_transition_matrix (np.ndarray or None, optional) – A precomputed transition matrix from compute_transition_matrix(). If None, the matrix is computed. For repeated calls with the same M, precomputing the matrix significantly improves performance. Default is None.

Returns:

  • eigenvalues (np.ndarray) – The Koopman eigenvalues. Shape (num_components,).

  • eigenfunctions (np.ndarray, optional) – The right eigenfunctions evaluated at eval_right_on if provided. Shape (len(eval_right_on), num_components).

Notes

The eigenfunctions are computed using the basis functions:

\[\phi_i(x) = c_i \sin^{2M-i}(\pi x) \cos^i(\pi x)\]

for i = 0, 1, …, 2M.

Examples

>>> # Compute eigenvalues only
>>> eigenvalues = compute_logistic_map_eig(M=10)
>>>
>>> # Compute eigenvalues and eigenfunctions
>>> x = np.linspace(0, 1, 100)
>>> eigenvalues, eigenfunctions = compute_logistic_map_eig(M=10, eval_right_on=x)
>>>
>>> # Efficient repeated calls
>>> P = compute_transition_matrix(M=10)
>>> eig1 = compute_logistic_map_eig(M=10, precomputed_transition_matrix=P)
>>> eig2 = compute_logistic_map_eig(M=10, precomputed_transition_matrix=P)