Skip to content
/ flumen Public

A neural architecture for approximating flows of dynamical systems with inputs

License

Notifications You must be signed in to change notification settings

mcpca/flumen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A neural architecture for approximating flows of dynamical systems with inputs

See our paper Miguel Aguiar, Amritam Das and Karl H. Johansson, Learning Flow Functions from Data with Applications to Nonlinear Oscillators (2023) for a description of the architecture.

The flumen package provides the PyTorch module implementing the architecture, and some auxiliary functions which can be used for training.

This repository also contains scripts to train a model using synthetic data. To generate the data, the semble package is required. To learn e.g. the Van der Pol dynamics, first create a data file as follows:

  python data_generation/semble_generate.py --n_trajectories 200 --n_samples 200 data_generation/vdp.yaml vdp_test_data

This will create a data file in ./data/vdp_test_data.pkl.

The script experiments/train_wandb.py provides an example of training the model using PyTorch. The wandb package is required to run the script. Set the environment variable WANDB_DISABLED=true if you do not have a Weights & Biases account or do not want to log the results. Then, run the script as follows:

  python experiments/train_wandb.py data/vdp_test_data.pkl vdp_test

This will create a directory in ./outputs/vdp_standard containing the model parameters and some metadata. To simulate the trained model, you can use the help script experiments/interactive_test.py.

About

A neural architecture for approximating flows of dynamical systems with inputs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages