Skip to content

Instantly share code, notes, and snippets.

@toshihikoyanase
Last active June 1, 2020 05:43
Show Gist options
  • Save toshihikoyanase/bf05f0d0aaf55770d3f96598034aeb6e to your computer and use it in GitHub Desktop.
Save toshihikoyanase/bf05f0d0aaf55770d3f96598034aeb6e to your computer and use it in GitHub Desktop.
A code snippet for LightGBMTunerCV.
params = {
"objective": "binary",
"metric": "binary_logloss",
"verbosity": -1,
"boosting_type": "gbdt",
}
tuner = lgb.LightGBMTunerCV(
params, dtrain, verbose_eval=100, early_stopping_rounds=100
)
tuner.run()
print("Best score:", tuner.best_score)
print("Best params:", tuner.best_params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment