logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·05.11.26
← Back to news

PySINDy – A package for the sparse identification of nonlinear dynamical systems

Original article
github.com|3 points|1 comments|by sebzuddas|Jul 24, 2026

PySINDy: Sparse Identification of Nonlinear Dynamical Systems

BuildCI Documentation Status PyPI Codecov JOSS1 JOSS2 DOI

Overview

PySINDy is a specialized Python library designed for system identification. It is built primarily around the Sparse Identification of Nonlinear Dynamical systems (SINDy) framework, as originally proposed by Brunton et al.

What is System Identification? It is the methodology of utilizing observed measurement data to deduce the underlying governing dynamics of a system.

By uncovering these equations, researchers can:

  • Generate predictions regarding future system states.
  • Develop informed control inputs.
  • Conduct theoretical analysis using analytical tools.

Unlike black-box machine learning models, the resulting models from PySINDy are inherently generalizable and interpretable.

The SINDy Workflow


Getting Started

Installation

The most efficient way to install the package is via pip or conda. To include optional optimizers, use the following command:

pip install pysindy[miosr]

Optimizer Options

Depending on your needs, you can utilize different optimization backends:

OptimizerBackend/MethodPurpose
cvxpyConvex OptimizerStandard convex optimization
miosrBranch-and-boundL0L_0L0​-constraint optimization
sbrBayesian RegressionYields posterior distributions

Practical Example

Imagine we are tracking a particle's position governed by the following system of differential equations:

{x˙=−2xy˙=y\begin{cases} \dot{x} = -2x \\ \dot{y} = y \end{cases}{x˙=−2xy˙​=y​

This system is decoupled, meaning the solutions are simply:

  • x(t)=x0e−2tx(t) = x_0 e^{-2t}x(t)=x0​e−2t
  • y(t)=y0ety(t) = y_0 e^ty(t)=y0​et

Using initial conditions x0=3x_0 = 3x0​=3 and y0=0.5y_0 = 0.5y0​=0.5, we can use PySINDy to recover the model:

import numpy as np
import pysindy as ps

# Assume x and y are arrays of measurement data
# Stack data: first column x, second column y
X = np.stack((x, y), axis=-1) 

# Initialize and fit the model
model = ps.SINDy().fit(X, t=t)
model.print()

Expected Output: x' = -2.000 x y' = 1.000 y


Resources & Support

If you are new to the library, consider the following checklist:

  • Explore the tutorials and examples for data generation and model fitting.
  • Review the object model to understand the internal architecture.
  • Watch the video playlist for practical implementation tips.

Community & Contribution

  • Issues: Found a bug or have a question? Please open a GitHub issue.
  • Contributing: To add features or fix bugs, refer to the Contributor Guide.
  • Academic Use: For citations and recommendations regarding scholarly work, see the Academic Use section.

The Ecosystem: Related Packages

PySINDy is part of a broader suite of tools for dynamical systems analysis:

  • Deeptime: Focused on time series analysis, including Markov model estimation, clustering, and dimension reduction.
  • PyDMD: Implements Dynamic Mode Decomposition for simplifying data-driven models via spatiotemporal structures.
  • SEED: A graphical user interface (GUI) that provides a visual wrapper for many PySINDy methods.
  • SymINDy: Integrates SINDy with symbolic regression (genetic programming) to optimize function libraries.
  • derivative: A utility package used by PySINDy for data smoothing and differentiation.