-
Notifications
You must be signed in to change notification settings - Fork 202
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
Allow y
to be vector-valued?
#35
Comments
Definitely agree. Actually it could be even nicer to just have the SymbolicRegression.jl backend loop over each y-component and return a list of equations at each complexity. Will think more about this. |
Just added capabilities for multi-output (and multiple equations returned). SymbolicRegression.jl will now return a list of equations for each output. This should be simple enough to set up for just importing into PySR. The trickier part is the JAX and PyTorch backend! I'm not sure how to approach - whether to continue outputting a different Torch/JAX model for each equation, or try to merge? It's probably overcomplicated to merge... |
Is the PyTorch backend (you mean exporting via For sympytorch at least it's possible to pass multiple equations to the |
The PyTorch backend hasn't been implemented yet; it's next on my todo list! That is nice that vector equations are supported! It doesn't assume the equations are all the same, but for different parameter choices, right? They can be completely different equations? |
Yep, completely different equations. |
Actually on second thought I'm not sure it will work due to the API of PySR: it will output a list of equations for each feature of |
Hmm. I see your point. Perhaps only offer an export as SymPy, and just document that there are external libraries to convert SymPy into PyTorch/JAX. Then the end user can do whatever they like to select their sympy expression from the various possibilities. |
It would be nice to allow
y
to be vector valued, essentially as a (parallelised?) shortcut for something like the following:This links to (and is actually motivated by) my suggestion in #32:
as_pytorch
could then return a singleSymPyModule
wrapping a list of allexpressions
, rather than returning severalSymPyModules
for each one, which would then have to be composed together in the above for loop.The text was updated successfully, but these errors were encountered: