|
@@ -33,9 +33,11 @@ def xgboost_train():
|
|
|
# 4. 模型训练
|
|
|
xgb_model = XGBClassifier(
|
|
|
objective='binary:logistic',
|
|
|
- learning_rate=0.3,
|
|
|
- max_depth=5,
|
|
|
- eval_metric=['mae', 'auc']
|
|
|
+ learning_rate=0.05,
|
|
|
+ max_depth=9,
|
|
|
+ min_child_weight=8,
|
|
|
+ n_estimators=450,
|
|
|
+ eval_metric=['error', 'auc']
|
|
|
)
|
|
|
xgb_model.fit(x_train, y_train, eval_set=[(x_train, y_train), (x_test, y_test)])
|
|
|
# 5. 模型保存
|