Created
August 30, 2022 19:49
-
-
Save joshreini1/c784ce1114c789fb725e4c0dbf944a42 to your computer and use it in GitHub Desktop.
Set hyperparameter space
This file contains 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
from hyperopt import STATUS_OK, Trials, fmin, hp, tpe | |
#use post data instead of pipe for hyperparameter tuning, get x_test_post | |
X_test_post = comprehensive_preprocessing.fit_transform(X_test, y_test) | |
#set hyperparameter space | |
space={'max_depth': hp.quniform("max_depth", 3, 18, 1), | |
'gamma': hp.uniform ('gamma', 0, 18), | |
'reg_alpha' : hp.uniform('reg_alpha', 0,1), | |
'reg_lambda' : hp.uniform('reg_lambda', 0,2), | |
'min_child_weight' : hp.uniform('min_child_weight', 0, 20), | |
'n_estimators': 1000, | |
'seed': 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment