-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix for non default optimize metric #1361
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
Conversation
fh = 12 | ||
fold = 2 | ||
|
||
exp.setup(data=load_data, fold=fold, fh=fh, fold_strategy="sliding") |
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.
it may be a good idea to later define a fixture for setup with fold_strategy="sliding"
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.
I think we will have to re-architect the unit tests at some point after alpha release. For example, we could have a fixture for create models also so that could be reused in all tests instead of creating them again in each test.
exp.setup(data=load_data, fold=fold, fh=fh, fold_strategy="sliding") | ||
|
||
model_obj = exp.create_model("naive") | ||
tuned_model_obj = exp.tune_model(model_obj, optimize="MAE") |
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.
we could parametrize this to accept MAE, SMAPE
and all the metrics available in time series module.
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.
Yes, good idea. Lets add it as an enhancement to make when we refactor the tests.
|
||
exp.setup(data=load_data, fold=fold, fh=fh, fold_strategy="sliding") | ||
|
||
model_obj = exp.create_model("naive") |
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.
is there a reason for testing the naive model? I image this makes test run faster as you only want to test non default parameters.
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.
Yes, it is to make it faster. I just want to test that the flow works with non-default parameters (so 1 model would be OK). There is already a flow that tests all models through tune_model with default arguments so I think this is a good compromise,
Related Issuse or bug
Time Series tune_model does not work with non-default
optimize
argumentDescribe the changes you've made
Fixed the above mentioned issue. Refit metric was not being passed to the Grid Search instantiation earlier.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit test has been added
Checklist: