From d57737f3f7e427ddde7c16b2049b74b6a6298382 Mon Sep 17 00:00:00 2001 From: Alan Kaptanoglu Date: Sat, 25 Feb 2023 13:39:00 -0800 Subject: [PATCH 1/2] Fixed all the binder links. --- examples/10_PDEFIND_examples.ipynb | 2 +- examples/11_SSR_FROLS_examples.ipynb | 2 +- examples/12_weakform_SINDy_examples.ipynb | 6 +- examples/13_ensembling.ipynb | 4 +- examples/14_cavity_flow.ipynb | 2 +- examples/15_pysindy_lectures.ipynb | 6 +- .../16_benchmark_paper.ipynb | 5 +- .../optimizer_comparison.ipynb | 5 +- .../parameterized_pattern_formation.ipynb | 73 ++----------------- .../StateSpaceModel.ipynb | 4 +- .../example7_reboot.ipynb | 4 +- .../viscoelastic_pod_models.ipynb | 4 +- examples/1_feature_overview.ipynb | 2 +- .../2_introduction_to_sindy/example.ipynb | 37 +--------- examples/3_original_paper.ipynb | 2 +- examples/4_scikit_learn_compatibility.ipynb | 2 +- examples/5_differentiation/example.ipynb | 42 +---------- examples/6_deeptime_compatibility.ipynb | 2 +- examples/7_plasma_examples.ipynb | 2 +- .../8_trapping_sindy_paper_examples.ipynb | 6 +- examples/9_sindypi_with_sympy.ipynb | 6 +- 21 files changed, 52 insertions(+), 166 deletions(-) diff --git a/examples/10_PDEFIND_examples.ipynb b/examples/10_PDEFIND_examples.ipynb index a413458e6..acee9cd3c 100644 --- a/examples/10_PDEFIND_examples.ipynb +++ b/examples/10_PDEFIND_examples.ipynb @@ -10,7 +10,7 @@ "This notebook provides a simple overview of the PDE functionality of PySINDy, following the examples in the PDE-FIND paper (Rudy, Samuel H., Steven L. Brunton, Joshua L. Proctor, and J. Nathan Kutz. \"Data-driven discovery of partial differential equations.\" Science Advances 3, no. 4 (2017): e1602614.). Jupyter notebook written by Alan Kaptanoglu.\n", "\n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/10_PDEFIND_examples.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/10_PDEFIND_examples.ipynb)" ] }, { diff --git a/examples/11_SSR_FROLS_examples.ipynb b/examples/11_SSR_FROLS_examples.ipynb index e530f4e3d..42977cfd7 100644 --- a/examples/11_SSR_FROLS_examples.ipynb +++ b/examples/11_SSR_FROLS_examples.ipynb @@ -11,7 +11,7 @@ "Jupyter notebook written by Alan Kaptanoglu and Jared Callaham.\n", "\n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/11_SSR_FROLS_examples.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/11_SSR_FROLS_examples.ipynb)" ] }, { diff --git a/examples/12_weakform_SINDy_examples.ipynb b/examples/12_weakform_SINDy_examples.ipynb index 21d79fb7f..f4fa3e83f 100644 --- a/examples/12_weakform_SINDy_examples.ipynb +++ b/examples/12_weakform_SINDy_examples.ipynb @@ -12,7 +12,7 @@ "As of release 1.7, the weak formulation is vectorized and much faster to compute. The \"num_pts_per_domain\" variable is now deprecated. It can still be passed to the WeakPDELibrary to avoid breaking old code, but it will raise a DeprecationWarning and do nothing to the library.\n", "\n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/12_weakform_SINDy_examples.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/12_weakform_SINDy_examples.ipynb)" ] }, { @@ -1476,7 +1476,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -1490,7 +1490,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.7.4" }, "toc": { "base_numbering": 1, diff --git a/examples/13_ensembling.ipynb b/examples/13_ensembling.ipynb index 3dba4e71c..d9e464b84 100644 --- a/examples/13_ensembling.ipynb +++ b/examples/13_ensembling.ipynb @@ -6,12 +6,12 @@ "source": [ "# Ensembling Feature Overview\n", "Ensembling is a fancy name for sub-sampling the data and generating $n_\\text{models}$ from regressing onto each of these sub-samples. In practice this helps to robustify the regressions against outliers and other issues. We highly recommend checking out the following paper for understanding the usefulness of these methods against noisy data: \n", - "#### Fasel, Urban, et al. \"Ensemble-SINDy: Robust sparse model discovery in the low-data, high-noise limit, with active learning and control.\" arXiv preprint arXiv:2111.10992 (2021). https://arxiv.org/abs/2111.10992\n", + "#### Fasel, U., Kutz, J. N., Brunton, B. W., & Brunton, S. L. (2022). Ensemble-SINDy: Robust sparse model discovery in the low-data, high-noise limit, with active learning and control. Proceedings of the Royal Society A, 478(2260), 20210904. https://arxiv.org/abs/2111.10992\n", "\n", "This notebook provides an overview of the basic and advanced functionality of using ensemble methods in PySINDy. Ensembling robustifies the SINDy method. Written by Alan Kaptanoglu and Urban Fasel. \n", "\n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/13_ensembling.ipynb)\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/13_ensembling.ipynb)\n", "\n", "There are many variants of ensembling/subsampling strategies and post-processing methods. We will show the following useful variants below:

\n", "Ensembling:
\n", diff --git a/examples/14_cavity_flow.ipynb b/examples/14_cavity_flow.ipynb index 94eb9a23c..dc2942262 100644 --- a/examples/14_cavity_flow.ipynb +++ b/examples/14_cavity_flow.ipynb @@ -25,7 +25,7 @@ "This Jupyter notebook example is written by Jared Callaham and demonstrates the use of SINDy to learn a model for the quasiperiodic dynamics in a shear-driven cavity at Re=7500, following [Callaham, Brunton, and Loiseau (2021)](https://arxiv.org/abs/2106.02409). It will focus on working through a relatively involved fluid dynamics example, rather than comparing optimizers, libraries, etc. This example also includes some other more advanced SINDy \"tricks\" like using dynamic mode decomposition to rotate the generalized coordinates and co-opting some of the SINDy infrastructure to perform nonlinear dimensionality reduction.\n", "\n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/14_cavity_flow.ipynb)\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/14_cavity_flow.ipynb)\n", "\n", "As in the cylinder wake example (see notebook 3), the reduced-order model appproximates the 2D time-varying velocity field $\\mathbf{u}(\\mathbf{x}, t)$ with the POD expansion\n", "$$\n", diff --git a/examples/15_pysindy_lectures.ipynb b/examples/15_pysindy_lectures.ipynb index f5dfba658..e9d8d73cb 100644 --- a/examples/15_pysindy_lectures.ipynb +++ b/examples/15_pysindy_lectures.ipynb @@ -8,7 +8,7 @@ "\n", "This notebook is a summary of the PySINDy YouTube lectures found [here](https://www.youtube.com/playlist?list=PLN90bHJU-JLoOfEk0KyBs2qLTV7OkMZ25). \n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/15_pysindy_lectures.ipynb)\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/15_pysindy_lectures.ipynb)\n", "\n", "These examples show how to use the SINDy method in practice, addressing the following practical questions:\n", "1. How does one choose the thresholding parameter $\\lambda$?\n", @@ -2229,7 +2229,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -2243,7 +2243,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.7.4" }, "toc": { "base_numbering": 1, diff --git a/examples/16_noise_robustness/16_benchmark_paper.ipynb b/examples/16_noise_robustness/16_benchmark_paper.ipynb index d91a14193..64b980e6f 100644 --- a/examples/16_noise_robustness/16_benchmark_paper.ipynb +++ b/examples/16_noise_robustness/16_benchmark_paper.ipynb @@ -13,7 +13,10 @@ "\n", "In addition, we investigate how Pareto-optimal models generated from sparse system identification methods depend on the dynamical properties of the equations, finding to leading order that the performance of these methods is independent of the dynamical properties of these equations, including the amount of chaos, scale separation, degree of nonlinearity, and, surprisingly, the syntactic complexity.\n", " \n", - "We will use the dysts database, containingn over 100 chaotic systems. We will investigate a subset of the systems that are polynomially nonlinear, with highest polynomial degree <= 4. All of the following 70 systems are bounded and exhibit strange attractors." + "We will use the dysts database, containingn over 100 chaotic systems. We will investigate a subset of the systems that are polynomially nonlinear, with highest polynomial degree <= 4. All of the following 70 systems are bounded and exhibit strange attractors.\n", + "\n", + "An interactive version of this notebook is available on binder\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/16_noise_robustness/16_benchmark_paper.ipynb)" ] }, { diff --git a/examples/16_noise_robustness/optimizer_comparison.ipynb b/examples/16_noise_robustness/optimizer_comparison.ipynb index e7acb2fbd..b2f94383b 100644 --- a/examples/16_noise_robustness/optimizer_comparison.ipynb +++ b/examples/16_noise_robustness/optimizer_comparison.ipynb @@ -7,7 +7,10 @@ "## Full optimizer comparison\n", "Notebook written by Lanyue Zhang and Alan Kaptanoglu\n", "\n", - "This post-processing file takes the results from Pareto-optimal scans of the dysts database with different optimizers and varying amounts of noise, as in the example Jupyter notebook 16_benchmark_paper.ipynb. The primary goal of this notebook is to fully reproduce the results shown in our new system identification benchmark paper." + "This post-processing file takes the results from Pareto-optimal scans of the dysts database with different optimizers and varying amounts of noise, as in the example Jupyter notebook 16_benchmark_paper.ipynb. The primary goal of this notebook is to fully reproduce the results shown in our new system identification benchmark paper.\n", + "\n", + "An interactive version of this notebook is available on binder\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/16_noise_robustness/optimizer_comparison.ipynb)" ] }, { diff --git a/examples/17_parameterized_pattern_formation/parameterized_pattern_formation.ipynb b/examples/17_parameterized_pattern_formation/parameterized_pattern_formation.ipynb index 2eb577d69..32e9a1f22 100644 --- a/examples/17_parameterized_pattern_formation/parameterized_pattern_formation.ipynb +++ b/examples/17_parameterized_pattern_formation/parameterized_pattern_formation.ipynb @@ -2,20 +2,20 @@ "cells": [ { "cell_type": "markdown", - "id": "653c7891", "metadata": {}, "source": [ "# SINDyCP Feature Overview\n", "This notebook provides an overview of the SINDyCP for discovery of parameterized pattern formation in PySINDy. Jupyter notebook written by Zachary G. Nicolaou.\n", "\n", "Model pattern formation equations typically encode the effects of external drive through a number of driving parameters, which characterize a bifurcation leading to the onset of instability. While driving parameters can be considered as constant control signals for spatiotemporal dynamics, combining the PDEFIND and SINDYc approaches to discover parameterized spatiotemporal dynamics poses a significant challenge.\n", - "Here, we develop the system identification for nonlinear dynamics with control parameters (SINDyCP) approach to discover such parameterized dynamics." + "Here, we develop the system identification for nonlinear dynamics with control parameters (SINDyCP) approach to discover such parameterized dynamics.\n", + "\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/17_parameterized_pattern_formation/parameterized_pattern_formation.ipynb)" ] }, { "cell_type": "code", "execution_count": 1, - "id": "b5e3a344", "metadata": {}, "outputs": [], "source": [ @@ -34,7 +34,6 @@ }, { "cell_type": "markdown", - "id": "98c50701", "metadata": {}, "source": [ "### Fit a parameterized logistic map\n", @@ -46,7 +45,6 @@ { "cell_type": "code", "execution_count": 2, - "id": "09f449d9", "metadata": {}, "outputs": [ { @@ -89,7 +87,6 @@ }, { "cell_type": "markdown", - "id": "07e9e302", "metadata": {}, "source": [ "Generate data for four trajectories with differing values of $r=3.6,3.7,3.8,3.9$." @@ -98,7 +95,6 @@ { "cell_type": "code", "execution_count": 3, - "id": "9b304915", "metadata": {}, "outputs": [], "source": [ @@ -119,7 +115,6 @@ }, { "cell_type": "markdown", - "id": "012e0ea4", "metadata": {}, "source": [ "Create a SINDyCP library, with a polynomial degree 3 feature library and a polynomial degree 1 parameter library. The library terms in a SINDyCP library consists of products of the features in the feature library and the parameter library. We input specify the parameter values for each trajectory using the control input, which must be the same shape as the input data." @@ -128,7 +123,6 @@ { "cell_type": "code", "execution_count": 4, - "id": "6bc2facd", "metadata": { "scrolled": true }, @@ -161,7 +155,6 @@ }, { "cell_type": "markdown", - "id": "5300123c", "metadata": {}, "source": [ "### Fit a parameterized Lorenz model\n", @@ -175,7 +168,6 @@ { "cell_type": "code", "execution_count": 5, - "id": "08490978", "metadata": {}, "outputs": [ { @@ -224,7 +216,6 @@ }, { "cell_type": "markdown", - "id": "16b084af", "metadata": {}, "source": [ "Fitting any one trajectory gives the equation corresponding to a specific set of parameter values. Can we discover the parameterized equations given all the trajectories?" @@ -233,7 +224,6 @@ { "cell_type": "code", "execution_count": 6, - "id": "972a8a17", "metadata": {}, "outputs": [ { @@ -264,7 +254,6 @@ }, { "cell_type": "markdown", - "id": "e7b158d4", "metadata": {}, "source": [ "We use the control input of ps.model to specify the parameter values, and fit a SINDy model with multiple trajectories.\n", @@ -274,7 +263,6 @@ }, { "cell_type": "markdown", - "id": "6346bd25", "metadata": {}, "source": [ "Fitting a PolynomialLibrary with multiple_trajectories=True gives the correct model, but note that the same library functions are applied to the input features and the control input." @@ -283,7 +271,6 @@ { "cell_type": "code", "execution_count": 7, - "id": "02e565e4", "metadata": {}, "outputs": [ { @@ -313,7 +300,6 @@ }, { "cell_type": "markdown", - "id": "a84503e7", "metadata": {}, "source": [ "The ParameterizedLibrary enables different libraries to be applied to the control input and input features. In this case, the result is the same, but different libraries are required for the PDE case, as shown below." @@ -322,7 +308,6 @@ { "cell_type": "code", "execution_count": 8, - "id": "57f62f68", "metadata": { "scrolled": true }, @@ -359,7 +344,6 @@ }, { "cell_type": "markdown", - "id": "e996dac4", "metadata": {}, "source": [ "### Fit a parameterized complex Ginzburg-Landau equation\n", @@ -371,7 +355,6 @@ { "cell_type": "code", "execution_count": 9, - "id": "82ed9abd", "metadata": {}, "outputs": [], "source": [ @@ -399,7 +382,6 @@ { "cell_type": "code", "execution_count": 10, - "id": "40b74d08", "metadata": { "scrolled": true }, @@ -436,7 +418,6 @@ }, { "cell_type": "markdown", - "id": "227220d9", "metadata": {}, "source": [ "Depending on the parameter values and initial conditions, the system exhibits different dynamical phases." @@ -445,7 +426,6 @@ { "cell_type": "code", "execution_count": 11, - "id": "644608d0", "metadata": { "scrolled": false }, @@ -496,7 +476,6 @@ }, { "cell_type": "markdown", - "id": "5ced73f8", "metadata": {}, "source": [ "Fitting any one trajectory gives the equation corresponding to a specific set of parameter values. Can we discover the parameterized equations given all the trajectories?" @@ -505,7 +484,6 @@ { "cell_type": "code", "execution_count": 12, - "id": "976ecddb", "metadata": {}, "outputs": [ { @@ -548,7 +526,6 @@ }, { "cell_type": "markdown", - "id": "64520e78", "metadata": {}, "source": [ "Try a SINDy model with multiple trajectories using the ParameterizedLibrary. Use a PDELibrary for the feature_library with second-order derivatives and library functions that include the relevant cubic term. Use a PDELibrary for the parameter_library with zeroth-order derivatives and linear library functions. The fit is very good!" @@ -557,7 +534,6 @@ { "cell_type": "code", "execution_count": 13, - "id": "a60535a5", "metadata": {}, "outputs": [ { @@ -618,7 +594,6 @@ }, { "cell_type": "markdown", - "id": "10db1fa6", "metadata": {}, "source": [ "Modifying PDELibrary to accept spectral derivatives improves the fit a bit" @@ -627,7 +602,6 @@ { "cell_type": "code", "execution_count": 14, - "id": "69bff99b", "metadata": {}, "outputs": [ { @@ -689,7 +663,6 @@ }, { "cell_type": "markdown", - "id": "418d9799", "metadata": {}, "source": [ "If we ensure the same domain cells are used in the feature library and the parameter library (by reseeding np.random), the WeakLibrary can be used with the ParameterLibrary. (In this case, the parameters need to be constants, so that the tensor product of two WeakLibrary corresponds to the correct weak features.) The fit is perfect and super fast!" @@ -698,7 +671,6 @@ { "cell_type": "code", "execution_count": 15, - "id": "42c92929", "metadata": { "scrolled": false }, @@ -768,7 +740,6 @@ }, { "cell_type": "markdown", - "id": "2a442d6e", "metadata": {}, "source": [ "### Oregenator model for BZ chemical reaction" @@ -776,7 +747,6 @@ }, { "cell_type": "markdown", - "id": "973f223f", "metadata": {}, "source": [ "We consider the coupled reaction diffusion equations\n", @@ -793,7 +763,6 @@ { "cell_type": "code", "execution_count": 16, - "id": "c3ac9f07", "metadata": {}, "outputs": [ { @@ -855,7 +824,6 @@ }, { "cell_type": "markdown", - "id": "da73238a", "metadata": {}, "source": [ "Integrate six trajectories with varying bs. This will take several hours to generate and save the data for the first time, but it will reload the files if they are present from a previous run." @@ -864,7 +832,6 @@ { "cell_type": "code", "execution_count": 17, - "id": "71c22095", "metadata": {}, "outputs": [], "source": [ @@ -922,7 +889,6 @@ }, { "cell_type": "markdown", - "id": "3efc8266", "metadata": {}, "source": [ "The SINDyCP fit reveals variations in the normal-form parameter that correct the weakly-nonlinear theory away from the instability, and these variations become extreme at the canard explosion. First, split the trajectories into training and test data and define a quadrative parameter and a quintic feature libraries." @@ -931,7 +897,6 @@ { "cell_type": "code", "execution_count": 18, - "id": "fde9313b", "metadata": {}, "outputs": [], "source": [ @@ -1022,7 +987,6 @@ }, { "cell_type": "markdown", - "id": "cd3002b1", "metadata": {}, "source": [ "We run the fit with a constrained SR3 optimizer, which allows us to ensure that the derivative terms remain rotationally invariant. Then we evaluate the scores on the test data." @@ -1031,7 +995,6 @@ { "cell_type": "code", "execution_count": 19, - "id": "e22b81f0", "metadata": { "scrolled": true }, @@ -1138,7 +1101,6 @@ }, { "cell_type": "markdown", - "id": "b678a71d", "metadata": {}, "source": [ "Plot the normal-form parameters as a function of $\\varepsilon$. The fit agrees with the weakly nonlinear prediction in the $\\mu\\to 0$ limit, and the variation with $\\mu$ represents a correction to the theory. The variations become extreme around the canard explosion that occurs above $\\mu^{1/2}=0.35$." @@ -1147,7 +1109,6 @@ { "cell_type": "code", "execution_count": 20, - "id": "a0d9e882", "metadata": { "scrolled": true }, @@ -1194,7 +1155,6 @@ }, { "cell_type": "markdown", - "id": "a2401dcc", "metadata": {}, "source": [ "Calculate a finely resolved trajectory above the canard explosion, with $\\mu=0.16$. The dynamics exhibit more extreme spatiotemporal variations than exhibited by the CGLE." @@ -1203,7 +1163,6 @@ { "cell_type": "code", "execution_count": 21, - "id": "0c55dcf3", "metadata": {}, "outputs": [], "source": [ @@ -1259,7 +1218,6 @@ { "cell_type": "code", "execution_count": 22, - "id": "59eec533", "metadata": { "scrolled": true }, @@ -1307,7 +1265,6 @@ }, { "cell_type": "markdown", - "id": "901f94a4", "metadata": {}, "source": [ "### Effects of noise on CGLE fits" @@ -1315,7 +1272,6 @@ }, { "cell_type": "markdown", - "id": "c45f6a07", "metadata": {}, "source": [ "Here we perform both differential and weak SINDyCP fits on the four previous trajectories with various intensities of injected noise. We generate two new test trajectories to assess the performance of the fits. We also generate five new training trajectories with random parameter values in the amplitude turbulence parameter regime and perform the SINDyCP fits on noisy data with a varying number of length of trajectories. Since these fits take a while, we use previously saved score results here if they are present." @@ -1324,7 +1280,6 @@ { "cell_type": "code", "execution_count": 23, - "id": "7a67d68f", "metadata": {}, "outputs": [], "source": [ @@ -1334,7 +1289,6 @@ }, { "cell_type": "markdown", - "id": "6a5aa61b", "metadata": {}, "source": [ "Plot results" @@ -1343,7 +1297,6 @@ { "cell_type": "code", "execution_count": 24, - "id": "2fe823c4", "metadata": {}, "outputs": [ { @@ -1470,7 +1423,6 @@ }, { "cell_type": "markdown", - "id": "bccf7299", "metadata": {}, "source": [ "### Swift Hohenberg \n", @@ -1484,7 +1436,6 @@ { "cell_type": "code", "execution_count": 25, - "id": "f9183e17", "metadata": {}, "outputs": [], "source": [ @@ -1509,7 +1460,6 @@ }, { "cell_type": "markdown", - "id": "93d91f2a", "metadata": {}, "source": [ "Randomly generate a relationship between the normal-form parameters $(r, b_3, b_5)$ and an experimental control parameter $\\varepsilon$" @@ -1518,7 +1468,6 @@ { "cell_type": "code", "execution_count": 26, - "id": "96614dbd", "metadata": {}, "outputs": [ { @@ -1584,7 +1533,6 @@ { "cell_type": "code", "execution_count": 27, - "id": "7969bc9b", "metadata": { "scrolled": true }, @@ -1621,7 +1569,6 @@ }, { "cell_type": "markdown", - "id": "7991969a", "metadata": {}, "source": [ "Fit the data with weak SINDyCP" @@ -1630,7 +1577,6 @@ { "cell_type": "code", "execution_count": 28, - "id": "f6cbacbd", "metadata": {}, "outputs": [ { @@ -1700,7 +1646,6 @@ }, { "cell_type": "markdown", - "id": "c425a389", "metadata": {}, "source": [ "Define some functions to store the fit results" @@ -1709,7 +1654,6 @@ { "cell_type": "code", "execution_count": 29, - "id": "7412fb5a", "metadata": {}, "outputs": [], "source": [ @@ -1859,7 +1803,6 @@ }, { "cell_type": "markdown", - "id": "7222342d", "metadata": {}, "source": [ "Stability of continuation orbits. The solutions have been continued with auto07p and their stability determined and saved." @@ -1868,7 +1811,6 @@ { "cell_type": "code", "execution_count": 30, - "id": "0afda80b", "metadata": {}, "outputs": [], "source": [ @@ -1929,7 +1871,6 @@ }, { "cell_type": "markdown", - "id": "8875e116", "metadata": {}, "source": [ "Plot the normal form parameters and continuation results" @@ -1938,7 +1879,6 @@ { "cell_type": "code", "execution_count": 31, - "id": "6a72fcb9", "metadata": {}, "outputs": [ { @@ -2040,7 +1980,6 @@ }, { "cell_type": "markdown", - "id": "2ee6768e", "metadata": {}, "source": [ "Extrapolate the model to parameters with twentry random initial conditions. The fit correctly predicts the localized states!" @@ -2049,7 +1988,6 @@ { "cell_type": "code", "execution_count": 32, - "id": "80be4f0c", "metadata": { "scrolled": true }, @@ -2130,7 +2068,6 @@ { "cell_type": "code", "execution_count": 33, - "id": "a65d67fc", "metadata": {}, "outputs": [ { @@ -2175,7 +2112,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -2189,7 +2126,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/examples/18_linear_stable_models/StateSpaceModel.ipynb b/examples/18_linear_stable_models/StateSpaceModel.ipynb index 42c35c983..207730771 100644 --- a/examples/18_linear_stable_models/StateSpaceModel.ipynb +++ b/examples/18_linear_stable_models/StateSpaceModel.ipynb @@ -12,7 +12,9 @@ "stable (even if there is substantial experimental noise), we need to constrain\n", "the $\\mathbf A$ matrix to be negative definite (note that if $\\mathbf u = \\mathbf K \\mathbf x$ as in a Kalman filter, we only need the weaker condition that $\\mathbf A + \\mathbf{B}\\mathbf K$ is negative definite). \n", "\n", - "The optimization problem solved for provably stable linear models is described further in example7_reboot.ipynb in this same folder. " + "The optimization problem solved for provably stable linear models is described further in example7_reboot.ipynb in this same folder. \n", + "\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/18_linear_stable_models/StateSpaceModel.ipynb)" ] }, { diff --git a/examples/18_linear_stable_models/example7_reboot.ipynb b/examples/18_linear_stable_models/example7_reboot.ipynb index 2fad8c882..a55e1699f 100644 --- a/examples/18_linear_stable_models/example7_reboot.ipynb +++ b/examples/18_linear_stable_models/example7_reboot.ipynb @@ -17,7 +17,9 @@ "$$ \\mathbf C\\mathbf A = \\mathbf d, \\quad \\mathbf D\\mathbf A \\leq \\mathbf e, \\quad \\lambda_\\text{max}(\\mathbf W) < 0.$$\n", "This is a convenient optimization problem that can be solved for variable projection. First solve the optimization for $\\mathbf{A}$ at fixed $\\mathbf{W}$ (this part, including with the constraints on $\\mathbf{A}$, is convex, so we can plug it right into CVXPY) and then for $\\mathbf{W}$ at fixed $\\mathbf{A}$, and repeat until convergence. For the $\\mathbf{W}$ solve, we use the same trick as the TrappingSR3 optimizer -- $\\mathbf{W}$ is a projection of $\\mathbf{A}$ onto the space of negative definite matrices.\n", "\n", - "In this example, we revisit the data from the Jupyter notebook Example 7 in order to build a stable 20-dimensional linear model, which performs quite well. " + "In this example, we revisit the data from the Jupyter notebook Example 7 in order to build a stable 20-dimensional linear model, which performs quite well. \n", + "\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/18_linear_stable_models/example7_reboot.ipynb)" ] }, { diff --git a/examples/18_linear_stable_models/viscoelastic_pod_models.ipynb b/examples/18_linear_stable_models/viscoelastic_pod_models.ipynb index 7c0d07500..61af1cc21 100644 --- a/examples/18_linear_stable_models/viscoelastic_pod_models.ipynb +++ b/examples/18_linear_stable_models/viscoelastic_pod_models.ipynb @@ -5,7 +5,9 @@ "metadata": {}, "source": [ "### SINDy-POD models for viscoelastic flows\n", - "Viscoelastic flows couple Navier-Stokes with a set of more complicated PDEs. Here we demonstrate that SINDy can generate high-dimensional, stable linear models for the evolution of the proper orthogonal modes obtained from fluid data." + "Viscoelastic flows couple Navier-Stokes with a set of more complicated PDEs. Here we demonstrate that SINDy can generate high-dimensional, stable linear models for the evolution of the proper orthogonal modes obtained from fluid data.\n", + "\n", + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/18_linear_stable_models/viscoelastic_pod_models.ipynb)" ] }, { diff --git a/examples/1_feature_overview.ipynb b/examples/1_feature_overview.ipynb index dd7bd5f5b..cd6fb9c25 100644 --- a/examples/1_feature_overview.ipynb +++ b/examples/1_feature_overview.ipynb @@ -20,7 +20,7 @@ } }, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/1_feature_overview.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/1_feature_overview.ipynb)" ] }, { diff --git a/examples/2_introduction_to_sindy/example.ipynb b/examples/2_introduction_to_sindy/example.ipynb index f27a62dfb..5f8b2b661 100644 --- a/examples/2_introduction_to_sindy/example.ipynb +++ b/examples/2_introduction_to_sindy/example.ipynb @@ -2,7 +2,6 @@ "cells": [ { "cell_type": "markdown", - "id": "97dfc2b6", "metadata": { "lines_to_next_cell": 0 }, @@ -13,17 +12,15 @@ }, { "cell_type": "markdown", - "id": "827fcf3f", "metadata": { "lines_to_next_cell": 0 }, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/2_introduction_to_sindy.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/2_introduction_to_sindy/example.ipynb)" ] }, { "cell_type": "markdown", - "id": "a164fa66", "metadata": { "lines_to_next_cell": 0 }, @@ -50,7 +47,6 @@ }, { "cell_type": "markdown", - "id": "13685931", "metadata": { "lines_to_next_cell": 0 }, @@ -113,7 +109,6 @@ }, { "cell_type": "markdown", - "id": "b015fa9b", "metadata": { "lines_to_next_cell": 0 }, @@ -134,7 +129,6 @@ }, { "cell_type": "markdown", - "id": "9c6295a4", "metadata": { "lines_to_next_cell": 0 }, @@ -157,7 +151,6 @@ { "cell_type": "code", "execution_count": 1, - "id": "760c027c", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.334793Z", @@ -184,7 +177,6 @@ { "cell_type": "code", "execution_count": 2, - "id": "72256309", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.847201Z", @@ -201,7 +193,6 @@ }, { "cell_type": "markdown", - "id": "6906c2ef", "metadata": {}, "source": [ "We can select a differentiation method from the `differentiation` submodule." @@ -210,7 +201,6 @@ { "cell_type": "code", "execution_count": 3, - "id": "ee86b513", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.854815Z", @@ -228,7 +218,6 @@ }, { "cell_type": "markdown", - "id": "df8b6bd3", "metadata": {}, "source": [ "While we could use this method to compute $\\dot X$ \"by hand,\" it is often more convenient to pass it into the `SINDy` object and let the computation of $\\dot X$ be handled automatically.\n", @@ -239,7 +228,6 @@ { "cell_type": "code", "execution_count": 4, - "id": "1b485201", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.861660Z", @@ -257,7 +245,6 @@ }, { "cell_type": "markdown", - "id": "97263ee3", "metadata": {}, "source": [ "Next we select which optimizer should be used." @@ -266,7 +253,6 @@ { "cell_type": "code", "execution_count": 5, - "id": "5617fad5", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.868326Z", @@ -284,7 +270,6 @@ }, { "cell_type": "markdown", - "id": "949d0ec9", "metadata": {}, "source": [ "Finally, we bring these three components together in one `SINDy` object." @@ -293,7 +278,6 @@ { "cell_type": "code", "execution_count": 6, - "id": "0e1555fc", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.875960Z", @@ -314,7 +298,6 @@ }, { "cell_type": "markdown", - "id": "72948949", "metadata": {}, "source": [ "Following the `scikit-learn` workflow, we first instantiate a `SINDy` class object with the desired properties, then fit it to the data in separate step." @@ -323,7 +306,6 @@ { "cell_type": "code", "execution_count": 7, - "id": "fb828425", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.882681Z", @@ -352,7 +334,6 @@ }, { "cell_type": "markdown", - "id": "b319c4f7", "metadata": {}, "source": [ "We can inspect the governing equations discovered by the model and check whether they seem reasonable with the `print` function." @@ -361,7 +342,6 @@ { "cell_type": "code", "execution_count": 8, - "id": "54b7321f", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.908324Z", @@ -386,7 +366,6 @@ }, { "cell_type": "markdown", - "id": "fc2df88d", "metadata": {}, "source": [ "Once the SINDy model has been fit we can use it to evolve new initial conditions forward in time with the `simulate` function." @@ -395,7 +374,6 @@ { "cell_type": "code", "execution_count": 9, - "id": "08129225", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:54.916864Z", @@ -413,7 +391,6 @@ { "cell_type": "code", "execution_count": 10, - "id": "0a8e1bc6", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:55.002231Z", @@ -452,7 +429,6 @@ }, { "cell_type": "markdown", - "id": "1d7adea2", "metadata": {}, "source": [ "Note that if the library we had chosen had been inappropriate for the problem at hand (i.e. if the dynamics could not be well-approximated as a sparse linear combination of library functions), then SINDy would have failed to produce a reasonable model. For example, if we solve the same problem, but using sines and cosines as our basis functions, SINDy is unable to find a sparse model for the dynamics:" @@ -461,7 +437,6 @@ { "cell_type": "code", "execution_count": 11, - "id": "a68446f0", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T00:43:55.722229Z", @@ -499,14 +474,10 @@ "jupytext": { "cell_metadata_filter": "-all", "main_language": "python", - "notebook_metadata_filter": "-all", - "text_representation": { - "extension": ".py", - "format_name": "percent" - } + "notebook_metadata_filter": "-all" }, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -520,7 +491,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/examples/3_original_paper.ipynb b/examples/3_original_paper.ipynb index 35a52dde9..d1e6922a2 100644 --- a/examples/3_original_paper.ipynb +++ b/examples/3_original_paper.ipynb @@ -13,7 +13,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/3_original_paper.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/3_original_paper.ipynb)" ] }, { diff --git a/examples/4_scikit_learn_compatibility.ipynb b/examples/4_scikit_learn_compatibility.ipynb index 896a0ef63..1200f7eb3 100644 --- a/examples/4_scikit_learn_compatibility.ipynb +++ b/examples/4_scikit_learn_compatibility.ipynb @@ -12,7 +12,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/4_scikit_learn_compatibility.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/4_scikit_learn_compatibility.ipynb)" ] }, { diff --git a/examples/5_differentiation/example.ipynb b/examples/5_differentiation/example.ipynb index a1f1a3430..136065426 100644 --- a/examples/5_differentiation/example.ipynb +++ b/examples/5_differentiation/example.ipynb @@ -2,7 +2,6 @@ "cells": [ { "cell_type": "markdown", - "id": "4f564d16", "metadata": { "lines_to_next_cell": 0 }, @@ -14,18 +13,16 @@ }, { "cell_type": "markdown", - "id": "96350665", "metadata": { "lines_to_next_cell": 0 }, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/5_differentiation.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/5_differentiation/example.ipynb)" ] }, { "cell_type": "code", "execution_count": 1, - "id": "5960f6ac", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:29.880939Z", @@ -83,7 +80,6 @@ }, { "cell_type": "markdown", - "id": "de5c5248", "metadata": {}, "source": [ "In the cell below we define all the available differentiators. Note that the different options in `SINDyDerivative` all originate from `derivative`.\n", @@ -100,7 +96,6 @@ { "cell_type": "code", "execution_count": 2, - "id": "95c0e048", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:31.312738Z", @@ -128,7 +123,6 @@ }, { "cell_type": "markdown", - "id": "9fe16724", "metadata": {}, "source": [ "## Compare differentiation methods directly\n", @@ -138,7 +132,6 @@ { "cell_type": "code", "execution_count": 3, - "id": "67417a70", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:31.323195Z", @@ -154,7 +147,6 @@ }, { "cell_type": "markdown", - "id": "d6ea4986", "metadata": {}, "source": [ "### Sine" @@ -163,7 +155,6 @@ { "cell_type": "code", "execution_count": 4, - "id": "50cc34fb", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:31.330293Z", @@ -195,7 +186,6 @@ }, { "cell_type": "markdown", - "id": "ce89e215", "metadata": {}, "source": [ "### Absolute value" @@ -204,7 +194,6 @@ { "cell_type": "code", "execution_count": 5, - "id": "0839ce75", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:32.321402Z", @@ -242,7 +231,6 @@ }, { "cell_type": "markdown", - "id": "06599fbb", "metadata": {}, "source": [ "## Compare differentiators when used in PySINDy\n", @@ -251,7 +239,6 @@ }, { "cell_type": "markdown", - "id": "3a8b25c8", "metadata": {}, "source": [ "### Linear oscillator\n", @@ -261,7 +248,6 @@ { "cell_type": "code", "execution_count": 6, - "id": "f38fd27a", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:33.395957Z", @@ -278,7 +264,6 @@ { "cell_type": "code", "execution_count": 7, - "id": "aaa58912", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:33.404670Z", @@ -297,7 +282,6 @@ { "cell_type": "code", "execution_count": 8, - "id": "9b848c29", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:33.434079Z", @@ -341,7 +325,6 @@ { "cell_type": "code", "execution_count": 9, - "id": "f9d57bfa", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:33.706134Z", @@ -385,7 +368,6 @@ { "cell_type": "code", "execution_count": 10, - "id": "7fe931df", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:38.684121Z", @@ -442,7 +424,6 @@ { "cell_type": "code", "execution_count": 11, - "id": "7a807897", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:38.702986Z", @@ -476,7 +457,6 @@ }, { "cell_type": "markdown", - "id": "62386501", "metadata": {}, "source": [ "### Lorenz system\n", @@ -487,7 +467,6 @@ { "cell_type": "code", "execution_count": 12, - "id": "93419e96", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:41.039987Z", @@ -504,7 +483,6 @@ { "cell_type": "code", "execution_count": 13, - "id": "cf5f3b32", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:41.048536Z", @@ -522,7 +500,6 @@ { "cell_type": "code", "execution_count": 14, - "id": "1996edb0", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:41.248445Z", @@ -569,7 +546,6 @@ { "cell_type": "code", "execution_count": 15, - "id": "0f293962", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:09:41.448635Z", @@ -608,7 +584,6 @@ { "cell_type": "code", "execution_count": 16, - "id": "0a514cc2", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:14:29.451420Z", @@ -673,7 +648,6 @@ { "cell_type": "code", "execution_count": 17, - "id": "7d737105", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:14:29.472262Z", @@ -708,7 +682,6 @@ { "cell_type": "code", "execution_count": 18, - "id": "7dfa8383", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:14:32.124453Z", @@ -745,7 +718,6 @@ { "cell_type": "code", "execution_count": 19, - "id": "3338bd98", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:15:39.738608Z", @@ -782,7 +754,6 @@ { "cell_type": "code", "execution_count": 20, - "id": "69ba7802", "metadata": { "execution": { "iopub.execute_input": "2022-07-06T23:15:40.230194Z", @@ -826,7 +797,6 @@ { "cell_type": "code", "execution_count": null, - "id": "1f28fa92", "metadata": {}, "outputs": [], "source": [] @@ -836,14 +806,10 @@ "jupytext": { "cell_metadata_filter": "-all", "main_language": "python", - "notebook_metadata_filter": "-all", - "text_representation": { - "extension": ".py", - "format_name": "percent" - } + "notebook_metadata_filter": "-all" }, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -857,7 +823,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.7.4" } }, "nbformat": 4, diff --git a/examples/6_deeptime_compatibility.ipynb b/examples/6_deeptime_compatibility.ipynb index e013f24ba..c3f674b3d 100644 --- a/examples/6_deeptime_compatibility.ipynb +++ b/examples/6_deeptime_compatibility.ipynb @@ -15,7 +15,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/6_deeptime_compatibility.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/6_deeptime_compatibility.ipynb)" ] }, { diff --git a/examples/7_plasma_examples.ipynb b/examples/7_plasma_examples.ipynb index 0af2777fb..c29d9c630 100644 --- a/examples/7_plasma_examples.ipynb +++ b/examples/7_plasma_examples.ipynb @@ -12,7 +12,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/7_plasma_examples.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/7_plasma_examples.ipynb)" ] }, { diff --git a/examples/8_trapping_sindy_paper_examples.ipynb b/examples/8_trapping_sindy_paper_examples.ipynb index b00a64f15..67dcc5652 100644 --- a/examples/8_trapping_sindy_paper_examples.ipynb +++ b/examples/8_trapping_sindy_paper_examples.ipynb @@ -21,7 +21,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7?filepath=examples/8_trapping_sindy_paper_examples.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/8_trapping_sindy_paper_examples.ipynb)" ] }, { @@ -2653,7 +2653,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.8.10 ('env': venv)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -2667,7 +2667,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.7.4" }, "toc": { "base_numbering": 1, diff --git a/examples/9_sindypi_with_sympy.ipynb b/examples/9_sindypi_with_sympy.ipynb index 162d149f3..411b5c7d0 100644 --- a/examples/9_sindypi_with_sympy.ipynb +++ b/examples/9_sindypi_with_sympy.ipynb @@ -15,7 +15,7 @@ "The benefit of not using the SINDy-PI functionality is that you can avoid using SymPy (see below).\n", "\n", "An interactive version of this notebook is available on binder\n", - "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.1?filepath=examples/9_sindypi_with_sympy.ipynb)" + "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dynamicslab/pysindy/v1.7.3?filepath=examples/9_sindypi_with_sympy.ipynb)" ] }, { @@ -1258,7 +1258,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -1272,7 +1272,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.7.4" } }, "nbformat": 4, From 972c788088c2ff5a1980e8d797b39fb553ccb5df Mon Sep 17 00:00:00 2001 From: Alan Kaptanoglu Date: Wed, 5 Apr 2023 08:21:24 -0700 Subject: [PATCH 2/2] First attempt at fixing the example notebook documentation on the readthedocs page. --- examples/README.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/README.rst b/examples/README.rst index 4ab9d917b..7d9831a95 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -3,7 +3,7 @@ PySINDy Examples This directory showcases the following examples of PySINDy in action. -`Feature overview `_ +`Feature overview <./1_feature_overview.ipynb>`_ ----------------------------------------------------------------------------------------------------------- This notebook gives an almost exhaustive overview of the different features available in PySINDy. It's a good reference for how to set various options and work with different types of datasets. @@ -11,7 +11,7 @@ This notebook gives an almost exhaustive overview of the different features avai --------------------------------------------------------------------------------------------------------------------- We recommend that people new to SINDy start here. We give a gentle introduction to the SINDy method and how different steps in the algorithm are represented in PySINDy. We also show how to use PySINDy to learn a model for a simple linear differential equation. -`Original paper `_ +`Original paper <./3_original_paper.ipynb>`_ ------------------------------------------------------------------------------------------------------- This notebook uses PySINDy to reproduce the examples in the `original SINDy paper `_. Namely, it applies PySINDy to the following problems: @@ -23,7 +23,7 @@ This notebook uses PySINDy to reproduce the examples in the `original SINDy pape * Logistic map * Hopf system -`Scikit-learn compatibility `_ +`Scikit-learn compatibility <./4_scikit_learn_compatibility.ipynb>`_ ------------------------------------------------------------------------------------------------------------------------------- Shows how PySINDy interfaces with various Scikit-learn objects. @@ -34,40 +34,40 @@ Shows how PySINDy interfaces with various Scikit-learn objects. --------------------------------------------------------------------------------------------------------- Explore the differentiation methods available in PySINDy on pure differentiation problems and as components in the SINDy algorithm. -`Deeptime compatibility `_ +`Deeptime compatibility <./6_deeptime_compatibility.ipynb>`_ ------------------------------------------------------------------------------------------------------------------------ See a demonstration of PySINDy objects designed to conform to the `Deeptime `_ API. -`Plasma physics `_ +`Plasma physics <./7_plasma_example.ipynb>`_ ---------------------------------------------------------------------------------------------- Use the ``ConstrainedSR3`` optimizer to build a constrained model for the temporal POD modes of a plasma simulation. -`Trapping SINDy `_ +`Trapping SINDy <./8_trapping_sindy_paper_examples.ipynb>`_ ----------------------------------------------------------------------------------------------------------- This notebook applies the ``TrappingSR3`` optimizer to various canonical fluid systems., proposed in this paper: Kaptanoglu, Alan A., et al. "Promoting global stability in data-driven models of quadratic nonlinear dynamics." Physical Review Fluids 6.9 (2021): 094401. A preprint is found here ``_. -`SINDyPI `_ +`SINDyPI <./9_sindypi_with_sympy.ipynb>`_ ---------------------------------------------------------------------------------------------- This notebook applies the ``SINDyPI`` optimizer to a simple implicit ODE and was originally proposed in this paper: Kaheman, Kadierdan, J. Nathan Kutz, and Steven L. Brunton. "SINDy-PI: a robust algorithm for parallel implicit sparse identification of nonlinear dynamics." Proceedings of the Royal Society A 476.2242 (2020): 20200279. -`PDEFIND `_ +`PDEFIND <./10_PDEFIND_examples.ipynb>`_ ---------------------------------------------------------------------------------------------- This notebook applies the PDEFIND algorithm (SINDy for PDE identification) to a number of PDEs, and was originally proposed in this paper: Rudy, Samuel H., et al. "Data-driven discovery of partial differential equations." Science Advances 3.4 (2017): e1602614. -`Greedy Algorithms `_ +`Greedy Algorithms <./11_SSR_FROLS_examples.ipynb>`_ ----------------------------------------------------------------------------------------------------- This notebook uses the step-wise sparse regression (SSR) and forward-regression orthogonal least-squares (FROLS) algorithms, which are greedy algorithms that iteratively truncate (or add) one nonzero coefficient at each algorithm iteration. -`Weak formulation SINDy `_ +`Weak formulation SINDy <./12_weakform_SINDy_examples.ipynb>`_ -------------------------------------------------------------------------------------------------------------- This notebook uses SINDy to identify the weak-formulation of a system of ODEs or PDEs, adding significant robustness against noise in the data. -`Model ensembles `_ +`Model ensembles <./13_ensembling.ipynb>`_ ---------------------------------------------------------------------------------------------- This notebook uses sub-sampling of the data and sub-sampling of the SINDy library to generate many models, and the user can choose how to average or otherwise combine these models together. This tends to make SINDy more robust against noisy data. -`Cavity flow `_ +`Cavity flow <./14_cavity_flow.ipynb>`_ ---------------------------------------------------------------------------------------------- Demonstrates the use of SINDy to learn a model for the quasiperiodic dynamics in a shear-driven cavity at Re=7500, following Callaham, Brunton, and Loiseau (2021), preprint available here ``_.