186d05b75a91c7ec57b54da68783c2853ccbc706,examples/pruning/lightgbm_integration.py,,objective,#Any#,23
Before Change
if param["boosting_type"] == "dart":
param["drop_rate"] = trial.suggest_loguniform("drop_rate", 1e-8, 1.0)
param["skip_drop"] = trial.suggest_loguniform("skip_drop", 1e-8, 1.0)
if param["boosting_type"] == "goss":
param["top_rate"] = trial.suggest_uniform("top_rate", 0.0, 1.0)
param["other_rate"] = trial.suggest_uniform("other_rate", 0.0, 1.0 - param["top_rate"])
After Change
dtrain = lgb.Dataset(train_x, label=train_y)
dtest = lgb.Dataset(test_x, label=test_y)
param = {
"objective": "binary",
"metric": "auc",
"verbosity": -1,
"boosting_type": "gbdt",
"lambda_l1": trial.suggest_loguniform("lambda_l1", 1e-8, 10.0),
"lambda_l2": trial.suggest_loguniform("lambda_l2", 1e-8, 10.0),
"num_leaves": trial.suggest_int("num_leaves", 2, 256),
"feature_fraction": min(trial.suggest_uniform("feature_fraction", 0.4, 1.0 + EPS), 1.0),
"bagging_fraction": min(trial.suggest_uniform("bagging_fraction", 0.4, 1.0 + EPS), 1.0),
"bagging_freq": trial.suggest_int("bagging_freq", 1, 7),
"min_child_samples": int(trial.suggest_uniform("min_child_samples", 5, 100 + EPS)),
}
// Add a callback for pruning.
pruning_callback = optuna.integration.LightGBMPruningCallback(trial, "auc")
gbm = lgb.train(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: pfnet/optuna
Commit Name: 186d05b75a91c7ec57b54da68783c2853ccbc706
Time: 2019-10-06
Author: eowner@gmail.com
File Name: examples/pruning/lightgbm_integration.py
Class Name:
Method Name: objective
Project Name: pfnet/optuna
Commit Name: 186d05b75a91c7ec57b54da68783c2853ccbc706
Time: 2019-10-06
Author: eowner@gmail.com
File Name: examples/lightgbm_simple.py
Class Name:
Method Name: objective
Project Name: pfnet/optuna
Commit Name: 274874a04f8ef36627043ea5c7d2d0f55278d386
Time: 2018-07-05
Author: toshihiko.yanase@gmail.com
File Name: examples/xgboost_cancer.py
Class Name:
Method Name: objective