Open dbl001 opened 1 year ago
Hey @dbl001, I was actually thinking about deleting the feynman problems as I didn't think anybody was using it (including myself). Has it been useful for you? If so you happen to have some time to upgrade it to the new PySRRegressor interface? Best, Miles
I just started using it. I got this working...
def run_on_problem(problem, verbosity=0, multiprocessing=True):
"""
Takes in a problem and returns a tuple: (equations, best predicted equation, actual equation)
"""
from time import time
starting = time()
model = PySRRegressor()
model.fit(problem.X, problem.y)
timing = time() - starting
others = {"time": timing, "problem": problem}
if not multiprocessing:
others["equations"] = model.equations_
return str(PySRRegressor.get_best(model)), problem.form, others
Currently, run_on_problem() uses the deprectated pysr() interface and pysr.best() does not work. Upgrade run_on_problem() to use the PySRRegressor Interface, model.fit() and get_best() function.