source:https://towardsdatascience.com/fine-tuning-xgboost-in-python-like-a-boss-b4543ed8b1e
首先正确地完成了特性工程的工作。特别是分类特性,因为XGBoost在输入中不接受分类特性。
1. Train-test split, evaluation metric and early stopping
- design the diagnosis framework of the model
How?
利用eval_set,包括Train &Test sets,并用eval_metric在这些评估集上衡量您的错误。
eval_set = [(X_train, y_train), (X_test, y_test)]
eval_metric = [