Question: Subset the data to include only the accidents that occurred in one city or during one month. Develop a decision tree model that predicts whether

Subset the data to include only the accidents that occurred in one city or during one month. Develop a decision tree model that predicts whether an automobile accident results in fatal or severe injuries using predictor variables, such as traffic violation category, weather condition, type of collision, location of the accident, and lighting condition.

 

IDCountyCityWeekdaySeverityViolCatClearWeatherMonthCrashTypeHighwayDaylight
1SAN DIEGOSAN DIEGO71801A01
2HUMBOLDTUNINCORPORATED41811A10
3VENTURAOXNARD211212A01
4STANISLAUSUNINCORPORATED41111A00
5MENDOCINOUNINCORPORATED51111A10
6LOS ANGELESLONG BEACH71313A00
7LOS ANGELESLOS ANGELES41303A01
8CALAVERASUNINCORPORATED11112A11
9SAN BERNARDINOHESPERIA21111A00
10VENTURAOXNARD50811A00
11VENTURAOXNARD60801A00
12ORANGEFULLERTON40912A00
13SAN DIEGOCHULA VISTA10311A00
14ALAMEDAOAKLAND60111A00
15LOS ANGELESLOS ANGELES50913A00
16SANTA CLARAMORGAN HILL40813A00
17LOS ANGELESLOS ANGELES30913A01
18SAN JOAQUINUNINCORPORATED30813A01
19LOS ANGELESLOS ANGELES50914A01
20ORANGEFOUNTAIN VALLEY40811A01
21RIVERSIDERIVERSIDE50911A01
22ORANGEANAHEIM20911A00
23CONTRA COSTAWALNUT CREEK40111A00
24SOLANOFAIRFIELD70111A00
25CONTRA COSTAUNINCORPORATED70911A01
26BUTTECHICO50911A01
27EL DORADOUNINCORPORATED70311A01
28ORANGEGARDEN GROVE60911A01
29TUOLUMNEUNINCORPORATED30811A10
30SONOMAUNINCORPORATED60911A01

Step by Step Solution

3.33 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres how to subset the data and build a decision tree model for predicting accident severity 1 Importing Libraries Python import pandas as pdfrom skl... View full answer

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 Business Analytics Data Questions!