Created
July 2, 2018 14:36
-
-
Save WillKoehrsen/01c289b69fa60577489cce81b63cae10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define the search space | |
space = { | |
'class_weight': hp.choice('class_weight', [None, 'balanced']), | |
'boosting_type': hp.choice('boosting_type', [{'boosting_type': 'gbdt', 'subsample': hp.uniform('gdbt_subsample', 0.5, 1)}, | |
{'boosting_type': 'dart', 'subsample': hp.uniform('dart_subsample', 0.5, 1)}, | |
{'boosting_type': 'goss'}]), | |
'num_leaves': hp.quniform('num_leaves', 30, 150, 1), | |
'learning_rate': hp.loguniform('learning_rate', np.log(0.01), np.log(0.2)), | |
'subsample_for_bin': hp.quniform('subsample_for_bin', 20000, 300000, 20000), | |
'min_child_samples': hp.quniform('min_child_samples', 20, 500, 5), | |
'reg_alpha': hp.uniform('reg_alpha', 0.0, 1.0), | |
'reg_lambda': hp.uniform('reg_lambda', 0.0, 1.0), | |
'colsample_bytree': hp.uniform('colsample_by_tree', 0.6, 1.0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment