-
Notifications
You must be signed in to change notification settings - Fork 27
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
User defined standardization of inputs when transforming. #242
Comments
I agree that the transforms class needs a significant refactor. So if I understand correctly, you're suggesting changing the class Transform:
"""Pre/post-processing of data for strategies
....
"""
def __init__(self, domain: Domain, min_max_scale_inputs: bool, standardize_inputs: bool, ...,**kwargs):
... If so, I would definitely be open to this. Would you be interested in submitting a PR? |
Yeah that's what I was thinking. There are two viable ways I see of implementing this:
I can submit a PR for either of these implementations. Both are relatively simple to implement so I can even submit a PR for both if you want to decide later? |
Thanks for thinking this through; it made me think a bit more. I like the direction that option 2 is starting to go in since it allows 1) composability of Transforms and 2) separating the fitting and transform steps. To that end, I am thinking that it actually might be good to adopt an API similar to scikit-learn pipelines. We would have a This appraoch would allow custom transforms by users (with smart defaults encoded into strategies) - solving the original issue in this post. Also, separating the fit and transform method would be a first step to allowing users to make predictions on arbitrary points with models trained by a strategy; this has been a top request over the last few months (see for example #214). What do you think? Again, thanks for raising this - I've been meaning to get around to it for a while. |
That would definitely be useful, I'll have a look into it. Doesn't seem like it would be too difficult. |
Okay, sounds great! LMK if you need any help!
…On Mon, 20 Mar 2023 at 23:34, TSAndrews ***@***.***> wrote:
That would definitely be useful, I'll have a look into it. Doesn't seem
like it would be too difficult.
I'll also see what I can do about #214
<#214>. I've
already developed a predict function for SOBO for my own work, which looks
like what they were looking for. I'll submit a PR for that and look into
the others if I have time.
—
Reply to this email directly, view it on GitHub
<#242 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGF3OR2FQWJHLJJST4UQ5WDW5DSSFANCNFSM6AAAAAAV5443QU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
In the current version, standardization options for transforms (min_max_scale_inputs/standardize_inputs) are hardcoded into each of the solver strategies. This makes it difficult for the user to customize them. This is especially important for the less maintained algorithms (such as Nelder Mead / SOBO) that have these settings off by default, as this can significantly reduce algorithm performance.
Recommendation
Move scale/standardization arguments into the initializer of the transform class. This will enable the user to change them relatively easily by just passing an initialized transform class to a strategy. It will remove the need to pass these arguments to each function that uses transform functions and so hardcoding will not be necessary. I believe it would also make a lot more intuitive sense for the user.
The text was updated successfully, but these errors were encountered: