-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from drorhilman/master
recent work on analysing the data and attempting to create a simple model that predicts and explain the major causes of injury
- Loading branch information
Showing
17 changed files
with
8,936 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
116 changes: 116 additions & 0 deletions
116
datascience/2018_11_21_model2_global_interpretation.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
132 changes: 132 additions & 0 deletions
132
...ce/data/2018_11_20_injury_risk_balanced_RF_classifier_full_03_permutations_importnace.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
feature,permutation_importance | ||
license_acquiring_date,0.03977586729236948 | ||
accident_year,0.023580126194370554 | ||
accident_month,0.015926662258545443 | ||
age_group=1,0.0010306875596873821 | ||
age_group=2,0.0006313894872327364 | ||
age_group=3,0.0005896652482813014 | ||
age_group=4,0.0037009232681299853 | ||
age_group=5,0.004251952301798534 | ||
age_group=6,0.0030287532802019124 | ||
age_group=7,0.003775348373258103 | ||
age_group=8,0.00342450877672007 | ||
age_group=9,0.0019493307010973737 | ||
age_group=10,0.001774963043451594 | ||
age_group=11,0.0013736935917241233 | ||
age_group=12,0.0009335791753142253 | ||
age_group=13,0.0011324898001225936 | ||
age_group=14,0.0011118044805449312 | ||
age_group=15,0.0014528922940981737 | ||
age_group=16,0.002412143029393743 | ||
age_group=17,0.0011290681784063006 | ||
age_group=99,0.042697734898774264 | ||
sex=1.0,0.012598574669024476 | ||
sex=2.0,0.009709432898258097 | ||
vehicle_type=1.0,0.07683820424614773 | ||
vehicle_type=2.0,0.004291153282676374 | ||
vehicle_type=3.0,0.0023993629608364264 | ||
vehicle_type=4.0,0.00043033336814202183 | ||
vehicle_type=6.0,0.00013550806032203155 | ||
vehicle_type=8.0,0.0005046841018626624 | ||
vehicle_type=9.0,0.0023870284495011163 | ||
vehicle_type=10.0,0.0014269841954530627 | ||
vehicle_type=11.0,0.007385691160310626 | ||
vehicle_type=12.0,0.003926367973302813 | ||
vehicle_type=15.0,0.0020533315966043686 | ||
vehicle_type=17.0,0.0010730777851946094 | ||
vehicle_type=18.0,0.0004644513183910126 | ||
vehicle_type=19.0,0.0031636392518927803 | ||
safety_measures=1.0,0.012168331244642339 | ||
safety_measures=2.0,0.002170262511683063 | ||
safety_measures=4.0,0.0015006169900282362 | ||
safety_measures=5.0,0.025081135312342684 | ||
population_type=1.0,0.008593263057740996 | ||
population_type=2.0,0.009478640298220542 | ||
population_type=3.0,0.0005666310541285746 | ||
population_type=4.0,0.0005084061625855174 | ||
home_region=1.0,0.0012176357986860564 | ||
home_region=2.0,0.009312587337068745 | ||
home_region=3.0,0.0021470981004452216 | ||
home_region=4.0,0.0057900357005844505 | ||
home_region=5.0,0.003405913105747116 | ||
home_region=6.0,0.0024419141454002924 | ||
home_region=7.0,0.0017545130543379361 | ||
home_district=11,0.0014965705947923569 | ||
home_district=21,0.00027385686676550947 | ||
home_district=22,0.00016662578208181955 | ||
home_district=23,0.0017989782958082179 | ||
home_district=24,0.0035734772563080774 | ||
home_district=31,0.0012826507728722625 | ||
home_district=32,0.0009575797950295284 | ||
home_district=41,0.0007967803549167041 | ||
home_district=42,0.0007838369109032239 | ||
home_district=43,0.00022593805340753725 | ||
home_district=44,0.0015415689208451155 | ||
home_district=51,0.0025974627493623448 | ||
home_district=61,0.000994724554162607 | ||
home_district=62,0.0019685684631198797 | ||
home_district=73,0.00016192534804326808 | ||
home_district=74,5.10958417453411e-05 | ||
home_district=76,0.00018363025397272192 | ||
home_district=99,0.015482092404159209 | ||
home_natural_area=111.0,0.0007211534937622277 | ||
home_natural_area=112.0,0.00017686675172434718 | ||
home_natural_area=221.0,9.417863420302375e-05 | ||
home_natural_area=222.0,7.983542364686791e-05 | ||
home_natural_area=234.0,0.0001311758587210221 | ||
home_natural_area=237.0,0.0007663432523543623 | ||
home_natural_area=241.0,0.0012646532950240097 | ||
home_natural_area=242.0,0.0006450813438744207 | ||
home_natural_area=243.0,0.00028485819678936153 | ||
home_natural_area=245.0,0.0002683136462731106 | ||
home_natural_area=246.0,0.00048164722282151295 | ||
home_natural_area=311.0,0.00110552748006576 | ||
home_natural_area=323.0,0.00023167002155100036 | ||
home_natural_area=324.0,0.00029780164080284166 | ||
home_natural_area=411.0,0.0003810733188076565 | ||
home_natural_area=412.0,0.00018206832017375607 | ||
home_natural_area=421.0,0.00043549640844364745 | ||
home_natural_area=422.0,0.0004172011764772554 | ||
home_natural_area=431.0,0.00025471884834527003 | ||
home_natural_area=432.0,0.00010388920415138614 | ||
home_natural_area=441.0,0.0003335493182818894 | ||
home_natural_area=442.0,0.00022254301208590732 | ||
home_natural_area=511.0,0.0006818073946690539 | ||
home_natural_area=512.0,0.0007641565450358101 | ||
home_natural_area=513.0,0.0004632044562401516 | ||
home_natural_area=611.0,9.525138134414135e-05 | ||
home_natural_area=612.0,0.0002047369667772525 | ||
home_natural_area=613.0,0.0007362039039102708 | ||
home_natural_area=614.0,0.0004176491500988977 | ||
home_natural_area=623.0,0.0004124063686131718 | ||
home_natural_area=730.0,0.000172614291307438 | ||
home_natural_area=740.0,8.918044604611097e-05 | ||
home_natural_area=760.0,0.0001561402191103678 | ||
home_residence_type=9.0,0.00020931376170718607 | ||
home_residence_type=10.0,0.00017539919175080243 | ||
home_residence_type=11.0,0.0007703072215178297 | ||
home_residence_type=12.0,0.0010454136353225119 | ||
home_residence_type=13.0,0.001919329624403554 | ||
home_residence_type=14.0,0.004362272619020446 | ||
home_residence_type=15.0,0.0014116957699524812 | ||
home_residence_type=16.0,0.003673439811244128 | ||
home_residence_type=17.0,0.0008962429836416597 | ||
home_residence_type=18.0,0.00037826183796940693 | ||
home_residence_type=19.0,0.00017338928433030532 | ||
home_residence_type=25.0,0.0006742542667560469 | ||
home_residence_type=26.0,0.0013466900586310837 | ||
home_residence_type=27.0,0.0016919598542820546 | ||
home_residence_type=28.0,0.0011227699673093117 | ||
home_residence_type=31.0,0.001271884773312415 | ||
home_residence_type=33.0,0.00047477739899426386 | ||
home_residence_type=37.0,0.0001947552231051919 | ||
car_id=1.0,0.029386185040153223 | ||
car_id=2.0,0.018027565378199273 | ||
car_id=3.0,0.0012206067618922845 | ||
car_id=4.0,0.00021649865718265104 | ||
involve_id=1,0.016893569489955462 | ||
involve_id=2,0.01052999049017922 | ||
involve_id=3,0.0030648252921938735 | ||
involve_id=4,0.0011571271411104922 | ||
involve_id=5,0.0007254352194622227 | ||
involve_id=6,0.0003522805761166925 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"license_acquiring_date": {"0.0": 0, "1977.0": 1, "1982.0": 2, "2006.0": 3, "2000.0": 4, "1989.0": 5, "1987.0": 6, "2012.0": 7, "2014.0": 8, "1985.0": 9, "2009.0": 10, "1980.0": 11, "2010.0": 12, "2002.0": 13, "2011.0": 14, "1986.0": 15, "1991.0": 16, "2005.0": 17, "1988.0": 18, "1967.0": 19, "1983.0": 20, "2013.0": 21, "1969.0": 22, "1999.0": 23, "1995.0": 24, "2004.0": 25, "1993.0": 26, "1973.0": 27, "1997.0": 28, "2015.0": 29, "2001.0": 30, "2007.0": 31, "1981.0": 32, "2003.0": 33, "1994.0": 34, "1998.0": 35, "1964.0": 36, "2008.0": 37, "1990.0": 38, "1996.0": 39, "1975.0": 40, "1992.0": 41, "1978.0": 42, "1974.0": 43, "1970.0": 44, "1984.0": 45, "1976.0": 46, "1972.0": 47, "1979.0": 48, "1968.0": 49, "1965.0": 50, "1971.0": 51, "1966.0": 52, "2017.0": 53, "2016.0": 54, "1963.0": 55, "2018.0": 56, "1962.0": 57, "1957.0": 58, "1961.0": 59, "1959.0": 60, "1956.0": 61, "1951.0": 62, "1958.0": 63, "1955.0": 64, "1953.0": 65, "1960.0": 66, "1952.0": 67, "1949.0": 68, "1950.0": 69, "1954.0": 70, "4444.0": 71, "1948.0": 72, "1911.0": 73, "3055.0": 74}, "accident_year": {"2009.0": 0, "2010.0": 1, "2015.0": 2, "2016.0": 3, "2014.0": 4, "2011.0": 5, "2012.0": 6, "2013.0": 7, "2017.0": 8, "2008.0": 9, "2018.0": 10}, "accident_month": {"4.0": 0, "11.0": 1, "6.0": 2, "10.0": 3, "5.0": 4, "12.0": 5, "1.0": 6, "7.0": 7, "9.0": 8, "3.0": 9, "8.0": 10, "2.0": 11}, "age_group": {"99.0": 0, "12.0": 1, "5.0": 2, "10.0": 3, "7.0": 4, "9.0": 5, "8.0": 6, "6.0": 7, "11.0": 8, "13.0": 9, "4.0": 10, "15.0": 11, "14.0": 12, "16.0": 13, "17.0": 14, "18.0": 15, "3.0": 16, "2.0": 17, "1.0": 18}, "sex": {"1.0": 0, "2.0": 1}, "vehicle_type": {"1.0": 0, "3.0": 1, "17.0": 2, "11.0": 3, "10.0": 4, "4.0": 5, "2.0": 6, "6.0": 7, "18.0": 8, "15.0": 9, "19.0": 10, "12.0": 11, "8.0": 12, "7.0": 13, "9.0": 14, "14.0": 15, "16.0": 16, "5.0": 17, "13.0": 18}, "safety_measures": {"5.0": 0, "2.0": 1, "4.0": 2, "1.0": 3, "3.0": 4}, "population_type": {"1.0": 0, "4.0": 1, "2.0": 2, "3.0": 3}, "home_region": {"3.0": 0, "4.0": 1, "7.0": 2, "5.0": 3, "2.0": 4, "6.0": 5, "1.0": 6, "8.0": 7}, "home_district": {"99.0": 0, "77.0": 1, "71.0": 2, "74.0": 3, "73.0": 4, "72.0": 5, "76.0": 6, "75.0": 7, "51.0": 8, "21.0": 9, "32.0": 10, "24.0": 11, "61.0": 12, "41.0": 13, "23.0": 14, "43.0": 15, "11.0": 16, "22.0": 17, "62.0": 18, "29.0": 19, "42.0": 20, "31.0": 21, "44.0": 22, "87.0": 23, "86.0": 24, "81.0": 25, "80.0": 26}, "home_natural_area": {"336.0": 0, "337.0": 1, "390.0": 2, "393.0": 3, "391.0": 4, "341.0": 5, "340.0": 6, "394.0": 7, "338.0": 8, "770.0": 9, "395.0": 10, "710.0": 11, "740.0": 12, "730.0": 13, "720.0": 14, "760.0": 15, "750.0": 16, "389.0": 17, "512.0": 18, "392.0": 19, "211.0": 20, "324.0": 21, "246.0": 22, "614.0": 23, "412.0": 24, "245.0": 25, "234.0": 26, "232.0": 27, "432.0": 28, "431.0": 29, "411.0": 30, "112.0": 31, "221.0": 32, "321.0": 33, "622.0": 34, "611.0": 35, "625.0": 36, "241.0": 37, "212.0": 38, "293.0": 39, "623.0": 40, "111.0": 41, "222.0": 42, "422.0": 43, "421.0": 44, "244.0": 45, "294.0": 46, "242.0": 47, "612.0": 48, "311.0": 49, "621.0": 50, "292.0": 51, "513.0": 52, "441.0": 53, "213.0": 54, "233.0": 55, "243.0": 56, "323.0": 57, "237.0": 58, "231.0": 59, "322.0": 60, "626.0": 61, "442.0": 62, "613.0": 63, "236.0": 64, "235.0": 65, "511.0": 66, "624.0": 67, "291.0": 68, "627.0": 69, "999.0": 70, "339.0": 71, "870.0": 72, "860.0": 73, "342.0": 74, "810.0": 75, "800.0": 76}, "home_residence_type": {"17.0": 0, "18.0": 1, "29.0": 2, "49.0": 3, "31.0": 4, "34.0": 5, "59.0": 6, "9.0": 7, "35.0": 8, "33.0": 9, "27.0": 10, "45.0": 11, "28.0": 12, "37.0": 13, "15.0": 14, "19.0": 15, "16.0": 16, "32.0": 17, "25.0": 18, "26.0": 19, "13.0": 20, "51.0": 21, "14.0": 22, "11.0": 23, "12.0": 24, "46.0": 25, "53.0": 26, "10.0": 27, "52.0": 28, "44.0": 29}, "car_id": {"1.0": 0, "2.0": 1, "3.0": 2, "5.0": 3, "4.0": 4, "7.0": 5, "13.0": 6, "10.0": 7, "6.0": 8, "11.0": 9, "9.0": 10, "12.0": 11, "8.0": 12, "17.0": 13, "15.0": 14, "18.0": 15, "14.0": 16, "19.0": 17, "21.0": 18, "20.0": 19, "16.0": 20, "28.0": 21, "25.0": 22, "27.0": 23, "23.0": 24, "29.0": 25, "22.0": 26, "30.0": 27, "26.0": 28, "24.0": 29}, "involve_id": {"4.0": 0, "3.0": 1, "1.0": 2, "2.0": 3, "5.0": 4, "6.0": 5, "8.0": 6, "7.0": 7, "10.0": 8, "9.0": 9, "11.0": 10, "15.0": 11, "26.0": 12, "12.0": 13, "58.0": 14, "13.0": 15, "30.0": 16, "16.0": 17, "14.0": 18, "19.0": 19, "20.0": 20, "17.0": 21, "18.0": 22, "29.0": 23, "73.0": 24, "25.0": 25, "21.0": 26, "23.0": 27, "77.0": 28, "60.0": 29, "50.0": 30, "31.0": 31, "45.0": 32, "49.0": 33, "22.0": 34, "28.0": 35, "65.0": 36, "54.0": 37, "56.0": 38, "66.0": 39, "34.0": 40, "52.0": 41, "63.0": 42, "53.0": 43, "61.0": 44, "78.0": 45, "37.0": 46, "48.0": 47, "36.0": 48, "46.0": 49, "38.0": 50, "27.0": 51, "24.0": 52, "41.0": 53, "47.0": 54, "39.0": 55, "43.0": 56, "44.0": 57, "51.0": 58, "33.0": 59, "32.0": 60, "67.0": 61, "35.0": 62, "42.0": 63, "59.0": 64, "55.0": 65, "57.0": 66, "71.0": 67, "72.0": 68, "40.0": 69, "68.0": 70, "64.0": 71, "76.0": 72, "69.0": 73, "70.0": 74, "62.0": 75, "79.0": 76, "75.0": 77, "74.0": 78}} |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.93 MB
datascience/models/2018_10_28_death_risk_balanced_RF_classifier_01.joblib
Binary file not shown.
Binary file added
BIN
+49.7 MB
datascience/models/2018_11_20_injury_risk_balanced_RF_classifier_02.joblib
Binary file not shown.
Binary file added
BIN
+66.2 MB
datascience/models/2018_11_20_injury_risk_balanced_RF_classifier_full_03.joblib
Binary file not shown.