GithubHelp home page GithubHelp logo

clementetienam / equation_learner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sheride/equation_learner

0.0 1.0 0.0 182 KB

EQL Function Learning Network

License: MIT License

Python 100.00%

equation_learner's Introduction

equation-learner

This is a reproduction of the EQL machine learning model and its variations [1, 2] using Keras and Tensorflow.

Imgur

Getting Started

It's worth noting that the resources in this repository are not perfectly documented and also highly customized to my research. Use at your own risk.

That being said, this repository can be used via a cloning to either your working directory or the folder housing your downloaded Python packages. models.py houses the EQL and EQLDIV classes, the two ML models developed in this project. These classes depend upon Keras and Tensorflow, along with custom Keras Layer/Constraint/Regularizer classes which can be found in the keras_classes.py file. Example code for creating and training the EQLDIV model shown in the image above is as follows.

import equation_learner as eql

my_eql_model = eql.models.EQLDIV(inputSize=3, outputSize=3, numLayers=3)
my_eql_model.build()
my_eql_model.fit(predictors, labels, numEpoch=1000)

Both EQL and EQLDIV classes have utility methods which allow users to do things like print the equation which the model has learned (getEquation()), plot 2-D slices of that equation (plotSlice()), and obtain the number of active nodes in the model architecture (sparsity()).

The user can use the functions in the data.py file to generate .npy files for use as training/testing datasets.

If the user is training their model to learn systems of ODEs, they can use functions in the ode.py file to evaluate and visualize the accuracy of their trained models, along with various other attributes depending on the system (conservation of energy, etc).

vpy.py contains functions which utilize VPython to create animations of double pendulums, controlled by their true equations of motion and/or equations of motion learned by an EQL/EQL-div model.

References

[1] Martius, Georg, and Christoph H. Lampert. "Extrapolation and learning equations." arXiv preprint arXiv:1610.02995 (2016).

[2] Sahoo, Subham S., Christoph H. Lampert, and Georg Martius. "Learning equations for extrapolation and control." arXiv preprint arXiv:1806.07259 (2018).

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.