Skip to main content
QUICK REVIEW

[Paper Review] PySINDy: A Python package for the Sparse Identification of Nonlinear Dynamics from Data

Brian M. de Silva, Kathleen Champion|arXiv (Cornell University)|Apr 17, 2020
Model Reduction and Neural Networks74 references34 citations
TL;DR

PySINDy provides a Python implementation of the SINDy framework to discover governing dynamical systems from data, with modular differentiation, library, and sparse regression components and scikit-learn compatibility.

ABSTRACT

PySINDy is a Python package for the discovery of governing dynamical systems models from data. In particular, PySINDy provides tools for applying the sparse identification of nonlinear dynamics (SINDy) (Brunton et al. 2016) approach to model discovery. In this work we provide a brief description of the mathematical underpinnings of SINDy, an overview and demonstration of the features implemented in PySINDy (with code examples), practical advice for users, and a list of potential extensions to PySINDy. Software is available at https://github.com/dynamicslab/pysindy.

Motivation & Objective

  • Motivate data-driven discovery of dynamical systems and provide interpretable models.
  • Deliver a Python package implementing SINDy with accessible, scikit-learn–style design.
  • Offer modular components (differentiation, library, optimizer) for flexibility and extension.
  • Demonstrate usage with examples (e.g., Lorenz system) and practical guidance for users.

Proposed method

  • Formulate dynamical systems as d x/dt = f(x) and approximate f with a sparse linear combination of library functions Θ(x).
  • Represent the dynamics as Ẋ ≈ Θ(X)Ξ and solve for Ξ using sparse regression.
  • Design the core PySINDy object as a scikit-learn estimator with three modular components: differentiation_method, feature_library, and optimizer.
  • Provide built-in options for differentiation (FiniteDifference, SmoothedFiniteDifference), libraries (PolynomialLibrary, FourierLibrary, CustomLibrary, IdentityLibrary), and optimizers (STLSQ, SR3), with support for user extensions.
  • Expose a practical workflow including data preparation, model fitting, derivative computation, prediction, and simulation.
  • Include tutorials and code examples demonstrating Lorenz system modeling and custom feature usage.

Experimental results

Research questions

  • RQ1How can the Sparse Identification of Nonlinear Dynamics be implemented as an accessible, extensible Python package?
  • RQ2What modular components are necessary to flexibly apply SINDy (differentiation, library construction, optimization) within a scikit-learn–style API?
  • RQ3How do different differentiation methods, libraries, and optimizers affect SINDy model recovery on standard dynamical systems (e.g., Lorenz)?
  • RQ4Can PySINDy serve both novice users and advanced researchers by providing sensible defaults and customizable options?
  • RQ5What guidance and extensions are feasible to improve robustness to noise and to broaden applicability (PDEs, latent coordinates, constraints)?

Key findings

  • PySINDy delivers a central, extensible codebase for SINDy with a scikit-learn–style interface.
  • The package supports multiple differentiation, library, and optimizer options, enabling flexible model discovery from data.
  • A practical workflow demonstrates fitting, differentiating, predicting, and simulating learned dynamics (e.g., Lorenz system).
  • Built-in options include FiniteDifference, SmoothedFiniteDifference, PolynomialLibrary, FourierLibrary, CustomLibrary, IdentityLibrary, STLSQ, and SR3, with support for user-defined components.
  • The documentation and tutorials (GitHub) provide extensive examples and guidance for both beginners and advanced users.
  • The authors discuss practical tips for numerical differentiation, library selection, regularization, and potential extensions to enhance robustness and applicability.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.