-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Verbose option during training #252
Comments
Hi @onacrame, This is a reasonable suggestion, and one we've been thinking about developing on our end too. The main reason we haven't implemented it yet is due to EBMs parallelization model -- unfortunately it's a bit trickier for us to provide reasonable verbose outputs than in the "standard" boosting algorithm setting. The primary complexities are due to 1) bagging (as you've pointed out), and 2) early stopping. The default EBM builds 8 mini-EBM models in parallel, and assuming your machine has enough cores, they tend to all finish at approximately the same time. This has two implications:
We have a couple options we've been thinking about, and would be curious on your (and anyone else reading this) thoughts:
Thanks again for the great question! |
Thanks for the detailed response. Completely get the limitations/practicalities now. |
I think a verbose setting such as Could this not be done by storing the scores for each mini-model in memory at each 100th round (in the case I understand this could very slightly increase training time, but I think it is really important for user experience, debugging/finding frozen models and, probably most importantly, understand how the model is training and therefore having a better understanding of how the models works and can be interpreted by the user. For me it strikes at the core of this package! Finally, the output for training interpretability in CatBoost is as follows, and can be extremely insightful: from catboost import CatBoostClassifier, Pool
train_data = [[1, 3], [0, 4], [1, 7], [0, 3]]
train_labels = [1, 0, 1, 1]
eval_data = [[1, 4], [0, 4.2], [1, 7], [0, 3]]
eval_labels = [1, 0, 1, 1]
model = CatBoostClassifier(learning_rate=0.03)
model.fit(train_data,
train_labels,
verbose=100,
eval_set=(eval_data, eval_labels),
plot=True) Just some food for though :D |
Option 2) would be very helpful. If I could even estimate the remaining time based on rounds and tendency to convergence/early stopping, it would help tremendously. Note that if the randomly chosen bag finished before the rest, reporting the next bag automatically would be a nice addition. |
EBMs generally take a fixed and consistent amount of time per round of boosting. You should be able to get a pretty good EBM after somewhere in the range of 1000-2000 rounds of boosting. Our default max is set to 5000, but usually it early stops before reaching that high. I think if you did an initial run with 20 rounds, most of the time will have been spent boosting instead of as startup time. So, to get an overall estimate multiply that time by 100 and it should be in the ballpark for 2000 rounds. I agree some feedback on time remaining would be better, but for now this is the best approach I can offer. |
Training time can be quite long, particular with inner bagging is used. It would be helpful to have a verbose option to understand where the EBM model is while in training and how the model is performing on the validation set.
The text was updated successfully, but these errors were encountered: