Giter Site home page Giter Site logo

symbolicregression's Introduction

Deep Symbolic Regression

This repository contains code for the paper End-to-end symbolic regression with transformers. An interactive demonstration of the paper may be found here.

The code is based on the repository Deep Learning for Symbolic Mathematics. Most of the code specific to recurrent sequences lies in the folder src/envs.

Install dependencies

Using conda and the environment.yml file:

conda env create --name symbolic regression --file=environment.yml

Also manually install a fork of sympytorch:

pip install git+https://github.com/pakamienny/sympytorch

Run the model

To launch a model training use with additional arguments (arg1,val1), (arg2,val2):

python train.py --arg1 val1 --arg2 --val2

All hyper-parameters related to training are specified in parsers.py, and environment HPs are in envs/environment.py

To launch evaluation, please use the flag reload_checkpoint to specify in which folder the saved model is located. python evaluate.py --reload_checkpoint XXX

Try out a pre-trained model

We include a small notebook that loads a pre-trained model you can play with in Example.ipynb

You can also check the demo website where you can play with the model without a single line of code here.

Multinode training

Distributed training is available via Slurm and submitit with grid-search:

pip install submitit

To launch a run on 2 nodes with 8 GPU each, use the submit.py script.

Dependencies

Citation

If you want to reuse this material, please considering citing the following:

@article{kamienny2022end,
  title={End-to-end symbolic regression with transformers},
  author={Kamienny, Pierre-Alexandre and d'Ascoli, St{\'e}phane and Lample, Guillaume and Charton, Fran{\c{c}}ois},
  journal={arXiv preprint arXiv:2204.10532},
  year={2022}
}

License

The majority of this repository is released under the Apache 2.0 license as found in the LICENSE file.

symbolicregression'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.