compute_logistic_map_invariant_pdf¶
- kooplearn.datasets.compute_logistic_map_invariant_pdf(M: int = 10, precomputed_transition_matrix: ndarray | None = None) Callable[[ndarray], ndarray][source]¶
Compute the invariant probability density function.
The invariant PDF for the logistic map with trigonometric noise. This function is computed by solving the Frobenius-Perron equation:
\[\pi(y) = \int p(y|x) \pi(x) dx\]where p(y|x) is the transition density.
- Parameters:
M (
int, optional) – Order of the trigonometric noise distribution. This determines the basis functions used for computing the transition matrix. Default is 10.precomputed_transition_matrix (
np.ndarrayorNone, optional) – A precomputed transition matrix fromcompute_transition_matrix(). If None, the matrix is computed. For repeated calls with the large values of M, precomputing the matrix significantly improves performance. Default is None.
- Returns:
A function that takes a scalar or array-like x as input and returns the value of the invariant PDF at those points.
- Return type:
Callable[[np.ndarray],np.ndarray]
Examples
>>> pdf = compute_logistic_map_invariant_pdf(M=10) >>> x = np.linspace(0, 1, 100) >>> density = pdf(x) >>> >>> # Efficient repeated calls >>> P = compute_transition_matrix(M=10) >>> pdf1 = compute_logistic_map_invariant_pdf(M=10, precomputed_transition_matrix=P) >>> pdf2 = compute_logistic_map_invariant_pdf(M=10, precomputed_transition_matrix=P)