Giter Site home page Giter Site logo

learned-koopman's Introduction

Nonlinear Harmonic Oscillator: Learning Koopman Operators with cVAE ๐ŸŽ‰

Welcome to this exciting repository! ๐ŸŒŸ This project aims to uncover the underlying dynamics of nonlinear harmonic oscillators using Conditional Variational Autoencoders (cVAE) to learn Koopman Operators. This topic is a treasure trove for anyone interested in leveraging machine learning for understanding nonlinear dynamical systems.

What's Inside? ๐Ÿ“

The repository is neatly organized with each file serving a specific purpose:

  • ./data_generator.py: Generates time-series data for the nonlinear harmonic oscillator, considering multiple initial conditions.

  • ./cVAE.py: Houses the cVAE class, the backbone of our machine learning approach to learning the low-rank approximation of the Koopman Operator.

  • ./learn.py: Executes the training loop for our cVAE, optimized with hyperparameters through Bayesian Optimization.

  • ./test.py: Evaluates the performance of the trained model and visualizes the predicted dynamics.

Diving into the Machine Learning Magic ๐ŸŒŸ

The cVAE.py file contains the blueprint of our Conditional Variational Autoencoder, designed to capture the nonlinear dynamics in its latent space. By learning a Koopman Operator, the cVAE transforms complex, nonlinear dynamics into linear dynamics in the latent space, making future state predictions more tractable.

The data generator in data_generator.py employs numerical methods to simulate the nonlinear harmonic oscillator, creating a rich dataset that considers a wide range of initial conditions.

Finally, test.py allows you to see the learned dynamics in action, comparing predicted states with actual states to measure the model's performance.

Getting Started ๐Ÿƒ

To kickstart your journey, clone this repository:

git clone https://github.com/joseph-crowley/learned-koopman.git
cd learned-koopman

Ensure that you have Python 3.x:

python --version

Install the necessary Python packages:

pip install numpy torch matplotlib

Run the training script to train your very own cVAE:

python learn.py

Contributing ๐Ÿค

Your contributions can make this project even better! Feel free to raise issues, propose new features, or contribute to the code/documentation through pull requests. Collaboration is the key to scientific discovery!

learned-koopman's People

Contributors

joseph-crowley avatar

Watchers

 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.