-
Notifications
You must be signed in to change notification settings - Fork 216
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
PySRSequenceRegressor #677
base: master
Are you sure you want to change the base?
Conversation
honestly I think it works it doesn't take an target array - only features :)
from 1 to 0
Thanks! Regarding the design, I wonder if this shouldn’t go into PySRRegressor itself, but rather be a separate input transform that you would compose with scikit-learn’s Pipeline: https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline This would be nice because it would automatically update Basically I think PySRRegressor is already too large and I’d like to break it into smaller, composable pieces, so it’s easier for users to implement custom behavior. Alternatively maybe this could be a separate class Also please add some tests, as well as tests for how this interacts with |
it inherits PySRRegressor and changes __init__ (new recursive_history_length hyperparameter) and run (preprocessing data so it works with everything else) also got rid of stuff in PySRRegressor also changed __init__.py to import new class
a lot copied from the PySRRegressor tests :)
for more information, see https://pre-commit.ci
test_sequence_weighted_bumper test still isn't passing; how do the weights work? |
oops wrong branch
for more information, see https://pre-commit.ci
One test (test_sequence_noisy_builtin_variable_names) isn't passing because set_params doesn't work when PySRSequenceRegressor calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment: should PySRSequenceRegressor
allow for multiple features? Right now it is just a scalar feature over time. But what if you want to have two features over time, like X_t
and Z_t
, and get recursive information for both of them?
(Just wondering why/why not)
I think for |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Weird, normally scikit-learn's checking function should automatically convert to a numpy array. The normal PySRRegressor you can pass it lists or pandas dataframes and it will get converted by scikit-learn to a numpy array. Is there a reason scikit-learn's conversion doesn't work here? |
yeah it works mb |
also theres a test failing in TestDimensionalConstraints and idk what's going on with it, but I think its something to do with a display_variable_names parameter messing up positional arguments |
ok i stopped the error; is that the right way to fix it? |
how do we fix the typing issue?? |
is this cheating lol
yo all checks passed 🎉 |
@MilesCranmer anything else I need to do before merging? |
Sorry for not reviewing the latest yet, got back from holiday recently and still catching up. In the meantime you might consider some “dogfooding” (https://en.m.wikipedia.org/wiki/Eating_your_own_dog_food) of PySRSequenceRegressor on some real problems that you have in mind? Just by using it on some real problems you will be able to find ways of improving the API. Maybe look up some math sequences or simple physics problems and try it out, and see what breaks and what works well, and what parts of the API are easy and what parts are confusing. (This is how I develop PySR in general - I’m both a user and a dev!) Anyways I hope to get to reviewing soon. |
Resolve #94
Adds ability to use symbolic regression on 1D recurrent array.
Added new keyword argument to PySRRegressor called
recursive_history_length
. Must be at least 1, or will throw aValueError
.Here an example of how it works:
Suppose you have the array
[1,2,3,4,5,6,7,8,9]
andrecursive_history_length = 3
.Then the feature array will be
And the target array will be:
And it's the same from there.