Question: CSC / DA 4 2 3 / 5 2 3 HW 6 Flights.csv contains informa > on on commercial flights depar > ng the Washington,

CSC/DA 423/523 HW6 Flights.csv contains informa>on on commercial flights depar>ng the Washington, DC area and arriving at New York during January 2004. For each flight, there is informa>on on the departure and arrival airports, the distance of the route, the scheduled >me and date of the flight, etc. The variable that we are trying to predict is whether a flight is delayed. A delay is defined as an arrival that is at least 15 minutes later than scheduled. 1. Data Preprocessing. Transform variable day of week (DAY_WEEK) info a categorical variable. Bin the scheduled departure >me (CRS_DEP_TIME) into eight bins. Use these and other columns(excluding DAY_OF_MONTH) which can be used for predic>ng the outcome. Par>>on the data into training (60%) and valida>on (40%) sets. 2. Fit a classifica>on tree to the flight delay variable using all the relevant predictors. Do not include DEP_TIME (actual departure >me) in the model because it is unknown at the >me of predic>on. Use a tree with maximum depth 8 and minimum impurity decrease =0.01. Display the resul>ng tree. 3. 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 informa>on would you need? Is it available in prac>ce?4. Fit the same tree as in (a), this >me excluding the Weather predictor. Display both the resul>ng (small) tree and the full-grown tree. You will find that the small tree contains a single terminal node. 5. How is the small tree used for classifica>on (what is the rule for classifying)? To what is this rule equivalent? 6. Examine the full-grown tree. What are the top three predictors according to this tree? Why, technically, does the small tree result in a single node? 7. What is the disadvantage of using the top levels of the full-grown tree as opposed to the small tree? Submit your notebook MyLastName.ipynb with your comments and answers included (in markdown).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!