Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sklearn-style interface? #60

Open
asross opened this issue Jan 4, 2022 · 0 comments
Open

sklearn-style interface? #60

asross opened this issue Jan 4, 2022 · 0 comments

Comments

@asross
Copy link

asross commented Jan 4, 2022

I was thinking about trying this method for a project, but the interface for running it (directories of text files and CSVs) seems pretty tricky to use / non-standard for Python users -- most people have their input data in numpy or pandas files, and don't want to parse through a complicated directory structure to inspect results.

It seems like it would be pretty straightforward, however, to create a scikit-learn-style wrapper class with a fit(X,y) method that:

  • takes in np.ndarrays for the inputs and target (and optionally operations + variable names as lists or tuples of strings)
  • creates a directory with all of these variables saved in the current format aifeynman supports
  • invokes aifeynman.run_aifeynman with the appropriate arguments + paths
  • exposes one-line helper methods and properties (on an instance of the wrapper class) to load different discovered equations from the results directory in a convenient form (e.g. giving SymPy/string expressions for different results along the Pareto frontier, as well as easy ways to evaluate them on test data)

Overall, I think creating an easy-to-use API for this method would do a ton to increase its impact. I was able to get other libraries like PySR and gplearn running in minutes, but this feels like it would take a good bit longer to figure out / set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant