-
Notifications
You must be signed in to change notification settings - Fork 1.8k
tune_model + create_model updates #1114
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
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.
Looks great, just have one suggestion that will simplify the code by a fair bit :)
self.logger.info("Defining Hyperparameters") | ||
|
||
# TODO: Replace with time series specific code | ||
def total_combintaions_in_grid(grid): |
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 can use ParameterGrid from sklearn for getting the combinations, I believe it'd be the easiest way: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.ParameterGrid.html - and it will allow for easy random search too
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.
Hi @Yard1 , That is what I am using though I am not sure it has methods to compute number of combinations.
pycaret/pycaret/time_series.py
Line 2435 in 568dd53
evaluate_candidates(ParameterGrid(self.param_grid)) |
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 it supports len. If not you should be able to calculate the number of possible combinations using some math, we probably don't need loops here
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.
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
error_score=error_score) | ||
for train, test in get_folds(cv, y)) | ||
# raise key exceptions | ||
except (TerminatedWorkerError, KeyboardInterrupt, SystemExit): |
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'm just wondering if an Out of Memory Error could also happen ?
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 guess it could. We can add them as we encounter them. What do you think?
Describe the changes you've made
Added tune_model capability along with updates for create model
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit tests have been added
Describe if there is any unusual behaviour of your code(Write
NA
if there isn't)NA
Checklist: