Challenge - GBDT Parameter Fine-Tune

In this challenge, you need to use GBDT to perform classification. Meanwhile, you should use Grid Search to fine-tune the parameters.

We'll cover the following

Challenge - GBDT parameter finetune

In this challenge, you need to do the following tasks:

  • Load the breast cancer dataset by load_breast_cancer.
  • Split the dataset into two parts, the test set accounts for 20%. Use 42 as the random seed.
  • Create a GBDT object. This is a classification task.
  • Use the Grid Search to finetune the parameters of the GBDT. To narrow the search space, in this challenge, you only need to finetune the learning_rate, n_estimators, and min_samples_leaf.
  • Finally, return the best F1-score.

Get hands-on with 1200+ tech skills courses.