Recent Releases of PySINDy

PySINDy - v2.0.0

It has been nearly three years since the last release of pysindy. There were a variety of typing holes or incompatibility with scikit-learn that required breaking backwards compatibility to fix. Moreover, much documentation was not testable. This meant that docs were frequently broken on backwards-incompatible changes.

In the interim, the only solution was to use the master branch and keep up to date with the repo changes. Now, however, there's a place to archive old example notebooks, and enough of the necessary incompatible changes are made. So it's possible to maintain a 2.x branch and continue to improve documentation.

TL;DR: Several new optimizers, feature library & differentiation improvements, smaller call signatures for pysindy model, simpler constraints.

What's Changed

  • PyProject-centric Build System with Setuptools in https://github.com/dynamicslab/pysindy/pull/332
  • Save DifferentiationMethod smoothed values in https://github.com/dynamicslab/pysindy/pull/244
  • Simpler inputs in https://github.com/dynamicslab/pysindy/pull/362
  • Implicit multiple trajectories in https://github.com/dynamicslab/pysindy/pull/376
  • Move unbias argument from SINDy.fit() to BaseOptimizer in https://github.com/dynamicslab/pysindy/pull/380
  • BUG Fixed coef_ for sparse_indices in https://github.com/dynamicslab/pysindy/pull/385
  • CLN: Remove fit_intercept in optimizers in https://github.com/dynamicslab/pysindy/pull/388
  • Allow STLSQ to only sparsify/regularize a subset of indices in https://github.com/dynamicslab/pysindy/pull/408
  • feat(optimizers): Enable pickling of MIOSR optimizer in https://github.com/dynamicslab/pysindy/pull/458
  • Make AxesArray handle slicing correctly in https://github.com/dynamicslab/pysindy/pull/451
  • Bayesian SINDy in https://github.com/dynamicslab/pysindy/pull/440
  • Make TrappingSR3 a subclass of ConstrainedSR3 in https://github.com/dynamicslab/pysindy/pull/435
  • Differentiation of Multidimensional Arrays in SINDyDerivative in https://github.com/dynamicslab/pysindy/pull/476
  • BUG: #414 remove user warning suppression in https://github.com/dynamicslab/pysindy/pull/528
  • CLN(pde_library): remove unused constructor argument in https://github.com/dynamicslab/pysindy/pull/537
  • ENH: #455 Make IdentityLibrary a subclass of Polynomial Library in https://github.com/dynamicslab/pysindy/pull/533
  • Trapping, extended to (a) enstrophy, and (b) local trapping in https://github.com/dynamicslab/pysindy/pull/536
  • ENH: #448 print flush in https://github.com/dynamicslab/pysindy/pull/527
  • CI: Add raw build and import step (should fail) in https://github.com/dynamicslab/pysindy/pull/543
  • BUG #394 fix prox and regularization in https://github.com/dynamicslab/pysindy/pull/544
  • ENH(sr3): refactor threshold and thresholder property in https://github.com/dynamicslab/pysindy/pull/548
  • Fix ssr in https://github.com/dynamicslab/pysindy/pull/559
  • Extract common functionality from SINDy to _BaseSINDy in https://github.com/dynamicslab/pysindy/pull/562
  • Pickle SR3 and subordinate classes in https://github.com/dynamicslab/pysindy/pull/586
  • BLD: Limit numpy to <2.0 in https://github.com/dynamicslab/pysindy/pull/596
  • Fix default n_subset based on replace flag (bootstrap logic) in https://github.com/dynamicslab/pysindy/pull/618
  • Make FROLS.history_ as a list in https://github.com/dynamicslab/pysindy/pull/619
  • Issue 386 Fix: Remove t_default and require t passed explicitly in SINDY.fit() and SINDY.score() in https://github.com/dynamicslab/pysindy/pull/628
  • Move featurenames from SINDy.init_() to SINDy.fit() in https://github.com/dynamicslab/pysindy/pull/635

New Contributors

  • @ludgerpaehler made their first contribution in https://github.com/dynamicslab/pysindy/pull/332
  • @yb6599 made their first contribution in https://github.com/dynamicslab/pysindy/pull/371
  • @mikkelbue made their first contribution in https://github.com/dynamicslab/pysindy/pull/440
  • @himkwtn made their first contribution in https://github.com/dynamicslab/pysindy/pull/528
  • @nehalsinghmangat made their first contribution in https://github.com/dynamicslab/pysindy/pull/559
  • @s-kat0 made their first contribution in https://github.com/dynamicslab/pysindy/pull/618

Full Changelog: https://github.com/dynamicslab/pysindy/compare/v1.7.5...v2.0.0

Scientific Software - Peer-reviewed - Python
Published by Jacob-Stevens-Haas 9 months ago

PySINDy - 2.0.0rc3

Modern Numpy

This release candidate includes changes to improve dependency management of pysindy, most notably, numpy 2.0 compatibility. There's also a mathematically interesting change to default sampling: see #618.

The goal of these release candidates is to allow sindy-related projects to specify a range of pysindy dependencies and not need to pin a github direct URL.

New Contributors

  • @s-kat0 made their first contribution in https://github.com/dynamicslab/pysindy/pull/618

Full Changelog: https://github.com/dynamicslab/pysindy/compare/v2.0.0-rc2...v2.0.0-rc3

Scientific Software - Peer-reviewed - Python
Published by Jacob-Stevens-Haas 10 months ago

PySINDy - 2.0.0rc2

MIOSR, SBR, and Trapping Extended

This release candidate includes many updates since v2.0.0-rc1 was introduced several years ago. It includes three new optimizers as well as a dramatically simplified pysindy.SINDy API.

Nothing functional is likely to change between now and a full release of v2.0.0. The RC only stands in until the documentation can be updated to the current API.

Scientific Software - Peer-reviewed - Python
Published by Jacob-Stevens-Haas about 1 year ago

PySINDy - Small fixes to docs and scs version

What's Changed

  • Think we have now actually fixed the example notebook documentation building so that they should all render properly on the readthedocs documentation site.
  • Fixed the SCS version requirements to avoid errors in TrappingSR3 with certain versions of Python.
  • Switched CI to test newer Python version 3.8, 3.9, 3.10.

Scientific Software - Peer-reviewed - Python
Published by akaptano about 3 years ago

PySINDy - Small doc fixes

What's Changed

  • Made fixes to the example notebook documentation building so that they should all render properly on the readthedocs documentation site.

Scientific Software - Peer-reviewed - Python
Published by akaptano about 3 years ago

PySINDy - Parametric library and benchmarks

What's Changed

  • Added ParameterizedLibrary by @znicolaou in https://github.com/dynamicslab/pysindy/pull/273 from this recent paper https://arxiv.org/abs/2301.02673. SINDy with control parameters (SINDyCP) is described further in the examples.
  • Added big benchmark functionality by @OliviaZ0826, @akaptano and @znicolaou from https://github.com/dynamicslab/pysindy/pull/266 from this recent paper https://arxiv.org/abs/2302.10787. Big benchmarks are shown using the dysts database and the results/functionality can also be found in the examples.
  • Added StableLinearSR3 optimizer by @akaptano from https://github.com/dynamicslab/pysindy/pull/269 that allows users to build arbitrarily large linear models that are guaranteed to be stable for any initial condition. Also allows for any number of linear equality and inequality constraints on the coefficients.
  • Fixed a few minor bugs with the Gurobipy version, the sphinx setup with the development tools in requirements-dev.txt, and flake8 website move from gitlab to GitHub.

Scientific Software - Peer-reviewed - Python
Published by akaptano over 3 years ago

PySINDy - v1.7.2

What's Changed

Added new mixed-integer optimization algorithm called MIOSR. Added new external unit tests of all the jupyter notebook examples. Made Gurobipy and cvxpy optional dependencies. Gurobipy is required for using MIOSR and cvxpy is needed for using inequality-constrained optimizers, the trapping SINDy algorithm, or the SINDy-PI algorithm. Ensembling functionality moved to the "EnsembleOptimizer", see updated Example 1 notebook for this.

Scientific Software - Peer-reviewed - Python
Published by akaptano over 3 years ago

PySINDy - v1.7.1

Should fix the compatibility errors with scikit-learn >= 1.0

What's Changed

  • Add common virtual environment directories to .gitignore by @Jacob-Stevens-Haas in https://github.com/dynamicslab/pysindy/pull/177
  • ENH: Raise explicit error when FROLS has linearly dependent columns. by @Jacob-Stevens-Haas in https://github.com/dynamicslab/pysindy/pull/193
  • BUG: SINDyDerivative set_params() missed sklearn interface by @Jacob-Stevens-Haas in https://github.com/dynamicslab/pysindy/pull/207

Scientific Software - Peer-reviewed - Python
Published by Jacob-Stevens-Haas almost 4 years ago

PySINDy - AxesArray and EnsemblingOptimizer

This is a pre-release of major version 2 of SINDY

This pre-release preserves a significant amount of backwards compatibility that will be removed in 2.0.0.

Internal array structure is made explicit via the AxesArray class. AxesArray objects carry axis label attributes, such as arr.ax_time, as well as shape attributes, such as arr.n_spatial. Currently, these attributes are incorrect when slicing, but are preserved in nearly all other operations.

This release also adds an EnsemblingOptimizer class to handle data and library bagging. While passing ensembling parameters via feature libraries and SINDy objects is still supported, they simply dispatch to an EnsemblingOptimizer. Stable versions of 2.x will remove this backwards compatibility, forcing the use of the EnsemblingOptimizer. In addition, ensembling both data and library terms creates each ensemble member from one data bag and one library bag. Previously, each ensemble member came from one library bag and another ensemble of data bags, which required nested loops and $O(n_{bags}^2)$ run time.

Problems that might be fixed before 2.0.0: - Allow passing AxesArray objects to pysindy directly - add __getitem__ and __setitem__ to AxesArray to handle slicing correctly and re-enable AxesWarnings when trying to create an AxesArray with missing or incompatible axes labels. - Fix binder links to example documentation Additional changes possible in version 2.0.0: - New method for SINDyPI? - Derivative methods now also return smoothed X values.

Scientific Software - Peer-reviewed - Python
Published by Jacob-Stevens-Haas almost 4 years ago

PySINDy - Revamped weak SINDy

We have implemented new techniques for computing the weak formulation of SINDy, reducing the runtime by at least an order of magnitude. The "numptsper_domain" option in the weak formulation is now deprecated, and see the revamped Example 12 notebook for the new performance. This release also addresses Issues #155 #158 #159 #164. We have some minor fixes planned for the future, and hope to have a version of model.predict and model.simulate working for the weak formulation in the coming few months.

Scientific Software - Peer-reviewed - Python
Published by akaptano about 4 years ago

PySINDy - Fixed small bug with Generalized Library

The GeneralizedLibrary class had a bug if libraries were tensored together while using the ensembling functionality. This small patch fixes that issue.

Scientific Software - Peer-reviewed - Python
Published by akaptano over 4 years ago

PySINDy - Finalized second PySINDy JOSS paper

This is PySINDy's second major release, representing new source code, documentation-generating scripts, examples, unit tests, and a markdown version of the new PySINDy JOSS submission openjournals/joss-reviews#3994. There is already a DOI via Zenodo, DOI.

Scientific Software - Peer-reviewed - Python
Published by akaptano over 4 years ago

PySINDy - Verbose option for optimizers and other fixes

This minor release adds a verbose option to all the optimizers so users can optionally track the error terms in the various optimization problems. See example Jupyter notebook 1 for a simple use case. It also makes some minor fixes, including:

  1. Fixed a minor test error (see Issue #149)
  2. Fixed an issue when using multiple_trajectories or ensemble flags with PDEs and Weak PDEs, see Issue #148
  3. Added Matplotlib to the dependencies so that (hopefully) the binder notebooks are now working properly online.
  4. Fixed some math notation in the optimizer documentations.

Scientific Software - Peer-reviewed - Python
Published by akaptano over 4 years ago

PySINDy - PDE-FIND and weak SINDy in arbitrary dimensions

This release allows for differentiation along specific axes, revamps the PDE-FIND and weak SINDy functionalities to work in arbitrary spatial dimensions, and moves all the array-reshaping to the internal code so the user-interface is easier. Finite difference coefficients are now computed on the fly depending on the derivative order "d" and accuracy order "order", i.e. finite differences now work for arbitrarily high derivative and accuracy order.

References

Other updates

  • Added a SpectralDerivative() class for spectral differentiation at faster speed than is available with the "derivative" python package.
  • Finite Differences now have periodic boundary condition support.
  • Cleaned up the example notebooks a bit.

Scientific Software - Peer-reviewed - Python
Published by akaptano over 4 years ago

PySINDy - System Identification for Noisy Data and PDEs+

This release fixes a minor bug in the README file which prevented the previous release from being properly deployed to PyPI.

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 4 years ago

PySINDy - System Identification for Noisy Data and PDEs

This release introduces a wide range of new and advanced functionality for PySINDy users, which enables the identification of implicit differential equations (SINDy-PI), partial differential equations (PDE-FIND), and weak-formulation differential equations for both ODEs and PDEs. Several new sparse regression optimizers are added, system identification with inequality constraints is now implemented, and ensembling methods are available with all the optimizers, significantly improving performance on noisy data. We include several new Jupyter notebook examples where these advanced features are explained and used for system identification, and additionally revamp a number of existing example notebooks.

References

  • Please see this paper for an overview of all the new tools available in this new release.
  • See this Youtube playlist for tips on using pysindy in practice and examples of new functionality.

Other updates

  • Added a TensoredLibrary class which allows one to combine two feature libraries together by taking all possible pairs of terms and use multiplication syntax like PolynomialLibrary() * FourierLibrary().
  • Additionally, we implement a GeneralizedLibrary class for concatenating and tensoring N different feature libraries together. Also allows each of the feature libraries to only use a subset of the input variables, and users can specify which of the libraries to tensor product together, for maximum flexibility (see Issue #134).
  • All optimizers now have the normalize_columns parameter, which normalizes each column of the feature library to magnitude 1 before performing the optimization. This often helps on systems with a wide range of scales.
  • The scikit-learn bug mentioned in Issues #124, #129, #130, and #131 is now fixed, so users can use PySINDy with scikit-learn versions >= 1.0.
  • The normalize option previously provided by our optimizers is deprecated. Please use the normalize_columns argument instead.
  • A large number of common ODEs have been added to the utils/odes.py file for reuse, and we would be happy if users would like to add additional systems.
  • PySINDy has switched default ODE solvers from odeint to solve_ivp. Note that solve_ivp defaults to the RK45 numerical solver. To reproduce old examples that used odeint, use solve_ivp with the following argument: method='LSODA', atol and rtol below 1e-12. This is the default behavior when calling SINDy.simulate.

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 4 years ago

PySINDy - Add cvxpy to requirements

This release simply moves cvxpy from an optional dependency to a required one. This package is needed to use the TrappingSR3 optimizer.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 5 years ago

PySINDy - Trapping SINDy++

This version removes auxiliary data files needed only for examples to make PySINDy small enough to deploy on PyPI.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 5 years ago

PySINDy - Trapping SINDy+

This release fixes a minor bug in the README file which prevented the previous release from being properly deployed to PyPI.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 5 years ago

PySINDy - Trapping SINDy

This release introduces the TrappingSINDy optimizer, which "enables the identification of models that, by construction, only produce bounded trajectories." To use TrappingSINDy you will need to install the cvxpy package. It includes a new notebook where TrappingSINDy is applied to standard fluid dynamics problems.

Please see this paper for more details about the new method.

Starting with this release, PySINDy will begin requiring Python 3.7 or above.

Other updates

  • Bug fix for SINDy.simulate for discrete systems with multiple control inputs

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 5 years ago

PySINDy - Constrained SR3

Major changes

This release introduces the ConstrainedSR3 optimizer. This is an enhanced version of the SR3 optimizer which allows one to specify linear equality constraints on the learned coefficients.

For example, if you know that the equations you are trying to learn look like text x' = a + by y' = c - bx (i.e. that the coefficient on y should be the negative of the coefficient on x), you could enforce that constraint using ConstrainedSR3.

Additionally, ConstrainedSR3 allows you to specify a different threshold parameter for each library function coefficient. This is an improvement on our other optimizers which all take a fixed regularization constant that is applied uniformly to all coefficients. You can use this feature to choose a higher threshold for, say, quadratic interaction terms like x*x or x*y than you do for linear terms, for example.

We also have added a notebook demonstrating these new features on a real world plasma dataset.

Other Updates

  • Fix bug with extrapolating control inputs outside of original time domain with SINDy.simulate
  • It is now possible to specify an initial guess for coefficients with the STLSQ and SR3 optimizers
  • Added some fancy plots to the differentiation notebook
  • Minor bug fixes

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 5 years ago

PySINDy - [Bug fix] Simulate with control inputs

This release fixes a minor issue causing SINDy.simulate to fail when vectors of control inputs are passed in (see #94).

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 5 years ago

PySINDy - Scikit-time objects

The main update in this release is the addition of two objects meant to conform to the API for Sckit-time: SINDyEstimator and SINDyModel. We also added a notebook showing how these two objects may be used.

We also made some other minor changes:

  • Add support for vector arguments for control inputs to SINDy.simulate (previously control inputs had to be callable)
  • Removed extraneous n_jobs parameter from the SINDy class
  • Added tests for SR3 trimming options
  • Updated some docstrings
  • Restructure examples/README content
  • Minor formatting updates for the new version of black

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 5 years ago

PySINDy - Expanded derivative options

This release implements the SINDyDerivative class, which allows one to use differentiation methods from the derivative package. This will enable the application of SINDy to much noisier datasets.

Note that PySINDy now requires the derivative package.

derivative includes the following numerical differentiation techniques: * Spectral derivatives (via the FFT) * Spline-based derivatives * Finite differences of arbitrary order * Polynomial least-squares (Savitzky-Golay) * Total variation regularized derivative (the method recommended in the original SINDy paper)

This release also contains some improvements to the documentation: * Example using SINDyDerivative in the Feature Overview notebook * A new notebook comparing all the differentiation options available in PySINDy * An example showing how to optimize parameters of derivative objects with cross-validation

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 6 years ago

PySINDy - Cross-validation

This release enables much easier cross-validation of SINDy models using Scikit-learn cross-validation tools. Major changes include: - t_default parameter added to the SINDy class. This parameter specifies the default time step that should be used whenever the t argument of a SINDy method is not used. - New notebook demonstrating cross-validation and other examples combining Scikit-learn and PySINDy objects.

More details can be found in #84.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 6 years ago

PySINDy - Bug fix: Require Scikit-learn 0.23

PySINDy now requires Scikit-learn version 0.23 instead of 0.21. There are also some minor bug fixes included in this release related to checking when optimizers have been fit.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 6 years ago

PySINDy - Bug fix: Make scoring consistent with sklearn

This release makes the SINDy.score function better conform to the call signature of metrics from sklearn.metrics. Resolves #80.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 6 years ago

PySINDy - Bug fix: Make compatible with sklearn 0.21

Fixes a minor bug in the CustomLibrary class for earlier releases of Scikit-learn (e.g. 0.21). Scikit-learn version 0.23 (the latest version) does not have this issue.

Scientific Software - Peer-reviewed - Python
Published by briandesilva almost 6 years ago

PySINDy - First official PySINDy release

This is PySINDy's first major release, including source code, documentation-generating scripts, examples, unit tests, and a markdown version of the PySINDy JOSS submission. This release includes a DOI via Zenodo:

DOI

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - Remove extraneous print statement

Removes an extraneous print statement put in the code for debugging purposes.

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - Enable control input interpolation

  • Expand allowable set of control input functions accepted by the u keyword argument of SINDy.simulate to include interpolating functions
  • Relax optimizer complexity test

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - Polish documentation

Documentation improvements: - Fixed formatting of class attributes on documentation site - Better code formatting for SINDy method docstrings - Add missing class attributes to docstrings

Code improvements: - More robust complexity test - Add missing attributes to SINDy class, optimizers, and feature libraries

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - SINDy with control

This release adds functionality for performing SINDy with control inputs (SINDYc). It also implements concatenation of feature libraries via the + operator.

Minor changes: * SINDy constructor properly instantiates optimizer, differentiation_method, and feature_library * improved discrete time input handling * Updated README * Various documentation typos fixed

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - Fix PyPI description

Fix syntax errors in rst for the previous long description for PyPI.

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - Expand documentation

The main changes in this release are all documentation-related. In particular we added information on the mathematical underpinnings behind the SINDy method in the README and created a new example notebook walking through the math in more detail.

Scientific Software - Peer-reviewed - Python
Published by briandesilva about 6 years ago

PySINDy - Refactor optimizers

Update the way optimizers are handled

Previously optimizers needed to inherit from our base class BaseOptimizer. In this version users can more easily pass in their own optimizers, which are then wrapped in a custom class performing some postprocessing steps. As a result of this change, we have removed the LASSO and ElasticNet optimizers since their corresponding sklearn objects can now be passed into the SINDy object directly.

Minor changes

  • Added quiet mode to SINDy.fit
  • Use L2 regularization by default for STLSQ

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 6 years ago

PySINDy - Improve optimizers

Changes in this version:

  • Optimizers are properly initialized so that copies created by MultiOutputClassifier share the same properties
  • Added documentation
  • Example notebooks conform to PEP8
  • A dummy library, IdentityLibrary , was implemented so that fully custom features can be used
  • Additional unit tests to improve coverage
  • Optimizers have unbias option to improve performance

Scientific Software - Peer-reviewed - Python
Published by briandesilva over 6 years ago

PySINDy - Version 0.11.0

Release Pipeline Test

Scientific Software - Peer-reviewed - Python
Published by Ohjeah over 6 years ago