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

Add Scikit-Learn compatible API #88

Merged
merged 49 commits into from Jan 31, 2022
Merged

Add Scikit-Learn compatible API #88

merged 49 commits into from Jan 31, 2022

Conversation

MilesCranmer
Copy link
Owner

@MilesCranmer MilesCranmer commented Jan 16, 2022

With this, one can call PySR with:

from pysr import PySRRegressor

model = PySRRegressor(...)
model.fit(X, y)


# will use either most accurate equation, or "best" equation, depending on 
# choice of "model_selection" setting, which can also be changed after `fit` as well.
model.predict(X) 

# All equations are viewable at:
model

^ Simply printing model will print the entire set of equations, with a marker for which equation is used by predict.

TODO

  • Add documentation for Scikit-Learn interface.
    • Alternatively, could treat it as the primary one?
  • Deprecate pysr()
  • Ensure PySRRegressor is documented in the API docs.
  • Add Sympy, JAX, PyTorch interfaces to Scikit-Learn interface.
  • Incorporate state to PySRRegressor?
  • Get working for multi-output
  • MSE -> Loss
  • Remove need for global state
  • Update relevant colab notebooks to use pysr==0.6.
    • PySR tutorial.
    • NeurIPS tutorial.
    • symbolic_deep_learning tutorial.

@MilesCranmer MilesCranmer merged commit d65676d into master Jan 31, 2022
@MilesCranmer MilesCranmer deleted the sklearn branch January 31, 2022 13:18
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

Successfully merging this pull request may close these issues.

None yet

1 participant