Add files via upload
This commit is contained in:
parent
63937159cc
commit
1ca30fe35e
2 changed files with 2 additions and 4 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
# Calculates the error of a given symbolic expression applied to a dataset. The input should be a string of the mathematical expression
|
# Calculates the error of a given symbolic expression applied to a dataset. The input should be a string of the mathematical expression
|
||||||
|
|
||||||
from get_pareto import Point, ParetoSet
|
from get_pareto import Point, ParetoSet
|
||||||
from RPN_to_pytorch import RPN_to_pytorch
|
|
||||||
from RPN_to_eq import RPN_to_eq
|
|
||||||
from sympy.parsing.sympy_parser import parse_expr
|
from sympy.parsing.sympy_parser import parse_expr
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ def run_bf_polyfit(pathdir,pathdir_transformed,filename,BF_try_time,BF_ops_file_
|
||||||
# run gradient descent of BF output parameters and add the results to the Pareto plot
|
# run gradient descent of BF output parameters and add the results to the Pareto plot
|
||||||
for i in range(len(express)):
|
for i in range(len(express)):
|
||||||
try:
|
try:
|
||||||
bf_gd_update = RPN_to_pytorch(pathdir+filename,eqns[i])
|
bf_gd_update = RPN_to_pytorch(pathdir,filename,eqns[i])
|
||||||
PA.add(Point(x=bf_gd_update[1],y=bf_gd_update[0],data=bf_gd_update[2]))
|
PA.add(Point(x=bf_gd_update[1],y=bf_gd_update[0],data=bf_gd_update[2]))
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
@ -171,7 +171,7 @@ def run_bf_polyfit(pathdir,pathdir_transformed,filename,BF_try_time,BF_ops_file_
|
||||||
# run gradient descent of BF output parameters and add the results to the Pareto plot
|
# run gradient descent of BF output parameters and add the results to the Pareto plot
|
||||||
for i in range(len(express)):
|
for i in range(len(express)):
|
||||||
try:
|
try:
|
||||||
bf_gd_update = RPN_to_pytorch(pathdir+filename,eqns[i])
|
bf_gd_update = RPN_to_pytorch(pathdir,filename,eqns[i])
|
||||||
PA.add(Point(x=bf_gd_update[1],y=bf_gd_update[0],data=bf_gd_update[2]))
|
PA.add(Point(x=bf_gd_update[1],y=bf_gd_update[0],data=bf_gd_update[2]))
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue