liqian 2 年之前
父節點
當前提交
847c2c496f
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      ad_xgboost_train.py

+ 5 - 3
ad_xgboost_train.py

@@ -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. 模型保存