Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 9.2 Predicting Delayed Flights . The file Flight Delays csy contains information on all commercial flights departing the Washington DC area and arriving at

image text in transcribed
Problem 9.2 Predicting Delayed Flights . The file Flight Delays csy contains information on all commercial flights departing the Washington DC area and arriving at New York during January 2004 . For each flight , there is information on the departure and arrival airports , the distance of the route the scheduled time and date of the flight , and so on The variable that we are trying to predict is whether or not a flight is delayed . A delay is defined as an arrival that is at least 15 minutes later than scheduled Data Preprocessing . Transform variable day of week DAY WEEK ) info a categorical variable Bin the scheduled departure time into eight bins in Ruse function cut( ) . Use these and all other columns as predictors ( excluding DAY OF MONTH . Partition the data into training and validation sets a . Fit a classification tree to the flight delay variable using all the relevant predictors . Do not include DEP TIME ( actual departure time ) in the model because it is unknown at the time of prediction ( unless we are generating our predictions of delays after the plane ales off , which is unlikely ) . Use a pruned tree with maximum of & levels , setting up 0.001 . Express the resulting tree as a set of rules b . If you needed to fly between DCA and EWR on a Monday at 7:00 AM , would you be able to use this tree ? What other information would you need ? Is it available in practice What information is redundant ? C . Fit the same tree as in ( a ) , this time excluding the Weather predictor . Display both the pruned and unpruned tree . You will find that the pruned tree contains a single terminal node

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statisitcs

Authors: Barry Monk

2nd edition

1259345297, 978-0077836351, 77836359, 978-1259295911, 1259295915, 978-1259292484, 1259292487, 978-1259345296

More Books

Students also viewed these Mathematics questions