By Subham S. Sahoo, Christoph H. Lampert and Georg Martius
Implemented by Anselm Paulus, Arnab Bhattacharjee and Michal Rolínek.
Autonomous Learning Group, Max Planck Institute for Intelligent Systems.
This repository contains TensorFlow implementation of the architecture ftom the ICML 2018 paper "Learning Equations for Extrapolation and Control". This work proposes a neural network architecture for symbolic regression.
Either provide a python function to 'learn' by calling
python3 data_utils.py "{'file_name': 'F1data', 'fn_to_learn': 'F1', 'train_val_examples': 10000, 'test_examples': 5000}"
or use your own numpy arrays saved in training/evaluation data files.
Once the data is fixed train the model with
python3 train.py '{"train_val_file": "data/F1data_train_val", "test_file": "data/F1data_test"}'
Or possibly change some parameters with
python3 train.py '{"train_val_file": "data/F1data_train_val", "test_file": "data/F1data_test", "batch_size": 25}'
In case you want to follow the model selection procedure from the paper, first generate runfiles for all the required settings with
python3 createjobs.py '{"train_val_file": "data/F1data_train_val", "test_file": "data/F1data_test"}'
Then run all scripts in the jobs folder.
Finally the model selection is performed by
python3 model_selection.py "{'results_path': 'results/model_selection'}"
In each result folder one can find png files with latex and graph representations of the learned formulas.
Latex representation of function F1:
Graph representation of function F1:
- python>=3.5
- tensorflow>=1.7
- graphviz (including binaries)
- latex
Disclaimer: This code is a PROTOTYPE and may contains bugs. Use at your own risk.
Contribute: If you spot some incompatibility of have some additional ideas, contribute via a pull request! Thank you!