Created
September 2, 2023 00:20
-
-
Save youssefHosni/339d4df153ec1cbf0e1677928f8cf415 to your computer and use it in GitHub Desktop.
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
import lightgbm as lgb | |
lgb_train = lgb.Dataset(X_train, y_train) | |
lgb_eval = lgb.Dataset(X_test, y_test, reference=lgb_train) | |
params = {'boosting_type': 'gbdt', | |
'objective': 'binary', | |
'num_leaves': 40, | |
'learning_rate': 0.1, | |
'feature_fraction': 0.9 | |
} | |
gbm = lgb.train(params, | |
lgb_train, | |
num_boost_round=200, | |
valid_sets=[lgb_train, lgb_eval], | |
valid_names=['train','valid'], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment