Giter Club home page Giter Club logo

hamiltonian_networks's Introduction

Hamiltonian Neural Networks for Solving Differential Equations.

These Hamiltonian Neural Networks is an alternative way to solve differential equations. This is a equation-driven unsupervised method since no data are used during the training of the network. For more information check the papers:

arXiv:1904.08991 : Physical Symmetries Embedded in Neural Networks

arXiv:2001.11107 : Hamiltonian Neural Networks for solving differential equations

Basic Usage Simply run the python codes, as:

python HamiltonianNet_nonlinearOscillator

python HamiltonianNet_HenonHeiles

Description Here, there are two python codes that include Hamiltonian neural networks used for solving differential equations that govern the spatio-temporal motion of dynamical systems. Two particular examples are presented by those codes. The nonlinear oscillator and the chaotic Henon-Heiles dynamical system. For comparison, a Scipy solver is used and its solutions are considered as the ground truth. In addition, an Euler symplectic integrator is used. The solutions obtained by the Hamiltonian neural network conserve the energy better than the solutions obtained by the symplectic Euler.

You can investigate different activation functions and parametric solutions. Check for the comments # Define the Activation and # parametric solutions, respectively.

After running the python codes (by reproducible run) figures will be saved. More specifically:

In nonlinear oscillator: (a) A figure with the training loss as a function of the training epochs; (b) The predicted trajectories x(t), y(t), the energy in time E(t), and the phase space trajectory p(x); (c) The errors of the predicted solutions delta_x(t), delta_p(t), the phase space error delta_p(delta_x), and again the energy in time.

In Henon-Heiles: (a) A figure with the training loss as a function of the training epochs; (b) The predicted trajectories x(t), y(t), the energy in time E(t), and the orbit in x-y plane y(x).

hamiltonian_networks's People

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.