LightGBMCV with Optuna #357
philipmassie
started this conversation in
General
Replies: 1 comment 2 replies
-
As it happens I just now came across this: #318 which got me thinking a little differently... and I came up with this. Its a little rough and I don't know what needs a deep copy... but it appears to work.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
If this already exists or is totally stupid, I apologise.
I'm struggling to figure out an efficient way to use LightGBMCV with Optuna.
I have an approach that works well, but the cv.setup step is repeated for every Optuna trial, which seems unnecessary since most of that time seems to be spent building features. For smaller sets it doesn't matter much, but when training sets become larger it adds a lot of time to tuning.
I came across the below approach somewhere which works well. I cant find the original link, but it's not mine.
nesting the setup inside the objective requires that to process on each trial.
I've tried:
- copy.deepcopy() doesn't appear copy the integrated lightgbm booster in it's entirety.
- cloudpickle similarly doesn't save the cv object in its entirety, and I'm not smart enough to figure out how to change that.
So I'm not smart enough to figure this out, and wondering if some else already has.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions