<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ara Zhang on Medium]]></title>
        <description><![CDATA[Stories by Ara Zhang on Medium]]></description>
        <link>https://medium.com/@arazhang?source=rss-16f179420fd8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sILOq0veu-RlMYgq.jpg</url>
            <title>Stories by Ara Zhang on Medium</title>
            <link>https://medium.com/@arazhang?source=rss-16f179420fd8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:37:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arazhang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Traffic Accident Prediction Model that Helps Fleet Services]]></title>
            <link>https://medium.com/@arazhang/a-traffic-accident-prediction-model-that-helps-fleet-services-45d703db003?source=rss-16f179420fd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/45d703db003</guid>
            <dc:creator><![CDATA[Ara Zhang]]></dc:creator>
            <pubDate>Tue, 20 Oct 2020 23:33:13 GMT</pubDate>
            <atom:updated>2020-10-20T23:33:13.831Z</atom:updated>
            <content:encoded><![CDATA[<p>Traffic accidents have been one of the major threats to fleet services, as fleet vehicles are facing more risks in long-distance commutes, and higher pressure to meet the delivery deadlines. Hereby, when experiencing severe weather and traffic accidents, fleet services are under high risks or may even cause accidents if not well operated.</p><p>To help fleet companies and their drivers without compromising the high-efficiency that they are trying hard to meet, a navigation company is working on creating a prediction model of how likely different factors including weather, location, driver situation, vehicle types, and more.</p><h3>Hereby, we analyzed the data is provided by <strong>Seattle Police Station</strong> which shows traffic collisions from <strong>2004 to the present on a weekly basis</strong>.</h3><p>The data contains <strong>37 independent variables and 194,673 entries</strong> and records the situation of the collisions including <strong>weather conditions, location, type of collision, vehicles involved, road and light conditions and more</strong>. We will be choosing the impact factors regarding collision situations that will be most applicable for fleet services.</p><p>By looking at the data, we found that there are multiple parameters recorded for a single accident, including <strong>collision ids and keys, collision data, severity code defined by SPD, collision status and type, location, pedestrian and vehicles involved, weather, road and light condition, speed, and more</strong>.</p><p><strong>SEVERITY</strong></p><p><strong>CODE</strong></p><p><strong>X</strong></p><p><strong>Y</strong></p><p><strong>OBJECTID</strong></p><p><strong>INCKEY</strong></p><p><strong>COLDETKEY</strong></p><p><strong>REPORTNO</strong></p><p><strong>STATUS</strong></p><p><strong>ADDRTYPE</strong></p><p><strong>INTKEY</strong></p><p><strong>…</strong></p><p><strong>ROADCOND</strong></p><p><strong>LIGHTCOND</strong></p><p><strong>PEDROWNOTGRNT</strong></p><p><strong>SDOTCOLNUM</strong></p><p><strong>SPEEDING</strong></p><p><strong>ST_COLCODE</strong></p><p><strong>ST_COLDESC</strong></p><p><strong>SEGLANEKEY</strong></p><p><strong>CROSSWALKKEY</strong></p><p><strong>HITPARKEDCAR</strong></p><p>In this case, the <strong>severity level </strong>is the target value we want to predict — the more severe it is, the more likely the fleet company should adjust the delivery time window and notify the driver in advance. In this case, only property damage (level 1) and injury (level 2) were recorded.</p><p>Then we will choose the independent variables that are critical to predicting the collision severity. Among all the factors, we have to pick the ones that <strong>cause the collision</strong> but <strong>not the result of the collision</strong>. For example, collision IDs and keys which are for the Police’s purpose to keep record should be removed, as well as how many pedestrians and vehicles involved — such details reflecting severity are already part of the target value we want to predict.</p><p>Based on the given variables, we will further explore the entries to clean up missing variables and check if there&#39;re enough valid entries. Among all impacting factors, <strong>weather</strong> <strong>conditions, road conditions, light conditions, and drug influences</strong> seem to have more valid data points and variables have enough data to create the model. However, we also found a strong correlation between road and weather conditions, which we will only keep weather conditions as such data is more accessible and predictable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/0*PGOX-bKIatfYlh6i" /></figure><p>In terms of the severity level of the accidents, the current entries contain 1 and 2, which indicates <strong>property</strong> <strong>damage</strong> and <strong>injury</strong> respectively with much more level 1 severity than level 2 — The same thing for other independent variables, data is skewed to mild or non severe conditions, such as daylight, clear weather, or dry road, which and thus will cause the model in the end to predict more level 1 severity accidents (property damage) than level 2.</p><p>Based on the findings above, we will first balance the data and then predict the model. To do that, we categorize different conditions to numerical values and balance the data using SMOTE function.</p><p><strong>Inattention</strong>: 1 = Yes, 0 = No</p><p><strong>Influence by Drug</strong>: 1 = Yes,0 = No</p><p><strong>Weather</strong>: 4 = Severe Crosswind, Blowing Sand/Dir, 3 = Sleet/Hail/Freezing Rain, Snowing, 2 = Raining, Fog, 1 = Partly Cloudy, Overcast, 0 = Other Unknown Clear, and missing values</p><p><strong>Light Conditio</strong>n: 3 = Dark No Street Lights, Dark — Street Lights Off, 2 = Dark Unkown Lighting, Dark, Street Lights On, 1 = Dawn, Dusk, 0 = Daylight, Unknown, Others and missing value</p><p><strong>Speeding</strong>: 1 = Yes, 0 = No</p><p>To find the best model fit, we conduct Decision Tree and Logistic Regression model and found Decision Tree has a better balance between the target value (67% for Property Damage, and 42% for Injury) comparing to Logistic Regressions (73% for Property Damage and 36% for Injury）</p><p><strong>Decision Tree: Accuracy Score: 60%</strong></p><p><strong>Logistic Regression: Accuracy Score: 59%</strong></p><p>Based on the result, we found that Decision Tree and Logistic Regression have similar overall accuracy rates, while <strong>Decision Tree </strong>has a better balance between the two severity levels.</p><p>Here by, Based on the selected decision tree model, we can then provide =a probability for accidents based on weather, and light level before the fleet driver is out for delivery. Based on the predicted value, they will adjust the route or delivery time accordingly.</p><p>For example, if the driver does not lose attention(0), did not take any drug(0), and not speeding, but then it was snowing that day (3) and the road condition is icy(3) and there is dawn time, the model suggested that the severity level is 2 (injury), meaning that proceeding the route under such condition may cause damage to the driver or encounter accident caused by other cars. In this way, the navigation system should notify the driver and customers of the potential delay in delivery and adjust the delivery time window accordingly.</p><h3>Moving forward, we need more data.</h3><p>In the real world, simply traffic data will not be the sole source to determine drivers’ activity.</p><p>For example, another indicator that can be quickly taken into consideration is the experience level of the driver. If the driver is more experienced going on a certain route under poor weather, he/she may be able to quickly find route or others.</p><p>Based on the analysis and results above, we suggest that majorly focusing on weather and light conditions, and have detailed records on driver’s condition on tiredness, healthy level as input of inattention condition and drug condition. Specifically:</p><ul><li>for weather such as <strong>severe Crosswind, Blowing Sand/Dir and freezing rain even snowing</strong>, with <strong>limited lighting in the evening</strong>, there is very likely hood of severe accidents that may cause injury, the navigation system should push notification to fleet drivers and customers for an extended delivery timeframe.</li><li>In order to optimize the more input should be added including the driver’s driving record and experience level at the company and route, and operational cost structure of extended deadline</li></ul><p>To further determine how much an extended deadline should be further pushed that will have minimum impact on the fleet service’s revenue model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45d703db003" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>