symbolic-regression/Code/ai_feynman_terminal_example.py
Silviu Marian Udrescu 41f66199b1
Add files via upload
2020-03-08 13:53:10 -04:00

17 lines
992 B
Python

import argparse
from S_run_aifeynman import run_aifeynman
parser = argparse.ArgumentParser()
parser.add_argument("--pathdir", type=str, help="Path to the directory containing the data file")
parser.add_argument("--filename", type=str, help="Name of the file containing the data")
parser.add_argument("--BF_try_time", type=float, default=60, help="Time limit for each brute force code call")
parser.add_argument("--BF_ops_file_type", type=str, default="14ops.txt", help="File containing the symbols to be used in the brute force code")
parser.add_argument("--polyfit_deg", type=int, default=4, help="Maximum degree of the polynomial tried by the polynomial fit routine")
parser.add_argument("--NN_epochs", type=int, default=2000, help="Number of epochs for the training")
opts = parser.parse_args()
run_aifeynman(opts.pathdir, opts.filename, BF_try_time=opts.BF_try_time, BF_ops_file_type=opts.BF_ops_file_type, polyfit_deg=opts.polyfit_deg,
NN_epochs=opts.NN_epochs)