| name | sindy-identification |
| description | Sparse Identification of Nonlinear Dynamics (SINDy) — discover governing equations from time-series data. Builds sparse dynamical system models dx/dt = f(x) from measurements using PySINDy. Use when you have trajectory data and want to find the underlying ODE. |
| category | physics |
| version | 1.0.0 |
| author | Synthetic Sciences |
| license | MIT |
| tags | ["SINDy","System Identification","Dynamical Systems","Equation Discovery","Sparse Regression"] |
| dependencies | ["pysindy>=2.1.0","scipy>=1.11.0","numpy>=1.24.0","matplotlib>=3.7.0"] |
SINDy — Sparse Identification of Nonlinear Dynamics
Overview
Discover governing ODEs from time-series data using SINDy (Brunton et al., PNAS 2016). Given measurements of state variables x(t), SINDy identifies the sparse set of terms in a library of candidate functions that best describe dx/dt.
When to Use
- You have trajectory data and want to find the governing ODE
- System is expected to have a sparse representation (few active terms)
- Input variables are known (you measured the right state variables)
- Data is relatively clean (or you can denoise it)
Do NOT Use When
- You want arbitrary symbolic expressions (use
symbolic-regression with PySR)
- You only have steady-state data (SINDy needs time derivatives)
- System is stochastic (SINDy assumes deterministic dynamics)
- You have PDE data (use PDE-FIND variant, not standard SINDy)
Installation
pip install pysindy
Core Workflows
1. Basic SINDy (Discover ODE from Data)
import numpy as np
import pysindy as ps
from scipy.integrate import solve_ivp
import matplotlib.pyplot as plt
def lorenz(t, y, sigma=10, rho=28, beta=8/3):
return [sigma*(y[1]-y[0]), y[0]*(rho-y[2])-y[1], y[0]*y[1]-beta*y[2]]
dt = 0.001
t_train = np.arange(0, 10, dt)
sol = solve_ivp(lorenz, (0, 10), [, , ], t_eval=t_train, rtol=)
x_train = sol.y.T
model = ps.SINDy(
feature_names=[, , ],
optimizer=ps.STLSQ(threshold=),
feature_library=ps.PolynomialLibrary(degree=),
)
model.fit(x_train, t=dt)
model.()