Git Product home page Git Product logo

sindyautoencoders's Introduction

SindyAutoencoders

Code for the paper "Data-driven discovery of coordinates and governing equations" by Kathleen Champion, Bethany Lusch, J. Nathan Kutz, and Steven L. Brunton.

The paper contains results for three example problems based on the Lorenz system, a reaction-diffusion system, and the nonlinear pendulum. Code for each example can be found in the respective subfolder in the examples folder. For each example, there are jupyter notebooks for (1) running the training procedure and (2) analyzing the resulting models.

Our training procedure can be replicated using the jupyter notebooks in each folder, which will run ten instances of the training and produce ten models. Running the notebook will also produce summary output, saved in a Pandas dataframe. The information saved in the dataframe can be used to compare among models. In the paper, we perform a model selection among the resulting models and select a subset of the models to highlight. Our model selection procedure is described in the appendix, along with a detailed description of the training procedure.

For each example, we also include jupyter notebooks to analyze the resulting models. These notebooks produce plots of the results and print out summary statistics on test data. The models analyzed in the paper are included in the repository.

Creating the network architecture and running the training procedure requires the specification of several parameters. A description of the parameters is as follows:

  • input_dim - dimension of each sample of the input data

  • latent_dim - dimension of the latent space

  • model_order - either 1 or 2; determines whether the SINDy model predicts first or second order derivatives

  • poly_order - maximum polynomial order to which to build the SINDy library; integer from 1-5

  • include_sine - boolean, whether or not to include sine functions in the SINDy library

  • library_dim - total number of library functions; this is determined based on the latent_dim, model_order, poly_order, and include_sine parameters and can be calculated using the function library_side in sindy_utils.py

  • sequential_thresholding - boolean, whether or not to perform sequential thresholding on the SINDy coefficient matrix

  • coefficient_threshold - float, minimum magnitude of coefficients to keep in the SINDy coefficient matrix when performing thresholding

  • threshold_frequency - integer, number of epochs after which to perform thresholding

  • coefficient_mask - matrix of ones and zeros that determines which coefficients are still included in the SINDy model; typically initialized to all ones and will be modified by the sequential thresholding procedure

  • coefficient_initialization - how to initialize the SINDy coefficient matrix; options are 'constant' (initialize as all 1s), 'xavier' (initialize using the xavier initialization approach), 'specified' (pass in an additional parameter init_coefficients that has the values to use to initialize the SINDy coefficient matrix)

  • loss_weight_decoder - float, weighting of the autoencoder reconstruction in the loss function (should keep this at 1.0 and adjust the other weightings proportionally)

  • loss_weight_sindy_z- float, weighting of the SINDy prediction in the latent space in the loss function

  • loss_weight_sindy_x - float, weighting of the SINDy prediction passed back to the input space in the loss function

  • loss_weight_sindy_regularization - float, weighting of the L1 regularization on the SINDy coefficients in the loss function

  • activation - activation function to be used in the network; options are 'sigmoid', 'relu', 'linear', or 'elu'

  • widths - list of ints specifying the number of units for each layer of the encoder; decoder widths will be the reverse order of these widths

  • epoch_size - number of training samples in an epoch

  • batch_size - number of samples to use in a batch of training

  • learning rate - float; learning rate passed to the adam optimizer

  • data_path - path specifying where to save the resulting models

  • print_progress - boolean, whether or not to print updates during training

  • print_frequency - print progress at intervals of this many epochs

  • max_epochs - how many epochs to run the training procedure for

  • refinement_epochs - how many epochs to run the refinement training for (see paper for description of the refinement procedure)

sindyautoencoders's People

Contributors

kpchamp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.