You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HistGradientBoosting avoid data shuffling when early_stopping activated #25460
hello, it would be useful if the HistGradientBoostingRegressor or HistGradientBoostingClassifier model had the ability to avoid data shuffling when using the early_stopping and validation_fraction parameters, since maintaining data order is a basic requirement in case you work with TimeSeries
Indeed, it could even be considered a methodological bug since the obtained model will not be viable. I am not sure what is the best approach here to solve the issue. Adding shuffle is one but I recall that we thought about early-stopping when playing with callbacks (ping @jeremiedbb). Through the callbacks, we could provide a given train-test split that would be designed for the application purpose.
The callback API discussed by @glemaitre is being drafted in #22000. This work is paused because it's indeed quite complex to get the API right to allow adding enough flexibility in early stopping data splits while still being intuitive to use, in particular with nesting cross-validation for model selection and evaluation...
There is a related discussion in #18748 where the conclusion is to add X_val and y_val as arguments of fit. This avoids to add all the splitter options in HGBT where they don’t belong.
Activity
glemaitre commentedon Jan 23, 2023
Indeed, it could even be considered a methodological bug since the obtained model will not be viable. I am not sure what is the best approach here to solve the issue. Adding
shuffleis one but I recall that we thought about early-stopping when playing with callbacks (ping @jeremiedbb). Through the callbacks, we could provide a given train-test split that would be designed for the application purpose.shamzos commentedon Jan 24, 2023
can I work on this one?
glemaitre commentedon Jan 24, 2023
@shamzos as said in my previous message, it is not clear to me what is the way forward. I would wait for the comment of @ogrisel and @jeremiedbb
ogrisel commentedon Jan 24, 2023
The callback API discussed by @glemaitre is being drafted in #22000. This work is paused because it's indeed quite complex to get the API right to allow adding enough flexibility in early stopping data splits while still being intuitive to use, in particular with nesting cross-validation for model selection and evaluation...
lorentzenchr commentedon Aug 20, 2023
Why not just add the parameters
shuffleandstratifyto the estimators and pass them to thetrain_test_split?ArturoAmorQ commentedon Oct 4, 2023
I will submit a PR to introduce a
shuffleparameter. In that case we can choose to automatically setstratify=Noneifshuffle=True.lorentzenchr commentedon Oct 4, 2023
There is a related discussion in #18748 where the conclusion is to add
X_valandy_valas arguments offit. This avoids to add all the splitter options in HGBT where they don’t belong.