Question: CSC / DA 4 2 3 / 5 2 3 HW 6 Flights.csv contains informa > on on commercial flights depar > ng the Washington,
CSCDA HW Flights.csv contains informaon on commercial flights deparng the Washington, DC area and arriving at New York during January For each flight, there is informaon 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 minutes later than scheduled. Data Preprocessing. Transform variable day of week DAYWEEK info a categorical variable. Bin the scheduled departure me CRSDEPTIME into eight bins. Use these and other columnsexcluding DAYOFMONTH which can be used for predicng the outcome. Paron the data into training and validaon sets. Fit a classificaon tree to the flight delay variable using all the relevant predictors. Do not include DEPTIME actual departure me in the model because it is unknown at the me of predicon Use a tree with maximum depth and minimum impurity decrease Display the resulng tree. If you needed to fly between DCA and EWR on a Monday at : AM would you be able to use this tree? What other informaon would you need? Is it available in pracce Fit the same tree as in a this me excluding the Weather predictor. Display both the resulng small tree and the fullgrown tree. You will find that the small tree contains a single terminal node. How is the small tree used for classificaon what is the rule for classifying To what is this rule equivalent? Examine the fullgrown tree. What are the top three predictors according to this tree? Why, technically, does the small tree result in a single node? What is the disadvantage of using the top levels of the fullgrown 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
