1. Learn
  2. /
  3. Courses
  4. /
  5. Machine Learning with PySpark

Exercise

Delayed flights with Gradient-Boosted Trees

You've previously built a classifier for flights likely to be delayed using a Decision Tree. In this exercise you'll compare a Decision Tree model to a Gradient-Boosted Trees model.

The flights data have been randomly split into flights_train and flights_test.

Instructions

100 XP
  • Import the classes required to create Decision Tree and Gradient-Boosted Tree classifiers.
  • Create Decision Tree and Gradient-Boosted Tree classifiers. Train on the training data.
  • Create an evaluator and calculate AUC on testing data for both classifiers. Which model performs better?
  • For the Gradient-Boosted Tree classifier print the number of trees and the relative importance of features.