Fast
Built on NumPy, SciPy, and usearch for high-performance nearest-neighbor search and numerical computation.
Fast
Built on NumPy, SciPy, and usearch for high-performance nearest-neighbor search and numerical computation.
Simple API
Module-level functions with clear signatures. No unnecessary class hierarchies.
Flexible
Supports batched operations, custom metrics, pluggable prediction functions, and optional tinygrad GPU acceleration.
Complete
Covers the full EDM workflow: embedding, simplex projection, S-Map, CCM, cross-validation, and synthetic data generation.
import numpy as npfrom edmkit.generate import lorenzfrom edmkit.embedding import lagged_embed, scan, selectfrom edmkit.simplex_projection import simplex_projection
# Generate Lorenz attractort, X = lorenz(sigma=10, rho=28, beta=8/3, X0=np.array([1.0, 1.0, 1.0]), dt=0.01, t_max=50)x = X[:, 0] # Use x-component
# Find optimal embedding parametersscores = scan(x, None, E=list(range(1, 11)), tau=[1, 2, 3, 5])best_E, best_tau, best_score = select(scores, E=list(range(1, 11)), tau=[1, 2, 3, 5])
# Embed and predictembedded = lagged_embed(x, tau=best_tau, e=best_E)n = len(embedded)lib = embedded[:n // 2]target = x[best_tau * (best_E - 1) + 1 : n // 2 + best_tau * (best_E - 1) + 1]query = embedded[n // 2:]
predictions = simplex_projection(lib, target, query)