<?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 Alexander Moen on Medium]]></title>
        <description><![CDATA[Stories by Alexander Moen on Medium]]></description>
        <link>https://medium.com/@alexandermoen?source=rss-4e015ec92895------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EpHMLPD33-kTy8Xv.</url>
            <title>Stories by Alexander Moen on Medium</title>
            <link>https://medium.com/@alexandermoen?source=rss-4e015ec92895------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:48:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexandermoen/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[Seattle Police Department Use of Force Analysis]]></title>
            <link>https://alexandermoen.medium.com/seattle-police-department-use-of-force-analysis-37b680f3ce5c?source=rss-4e015ec92895------2</link>
            <guid isPermaLink="false">https://medium.com/p/37b680f3ce5c</guid>
            <dc:creator><![CDATA[Alexander Moen]]></dc:creator>
            <pubDate>Fri, 18 Dec 2020 04:37:59 GMT</pubDate>
            <atom:updated>2020-12-18T04:57:30.548Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Seattle Police Department Use of Force Analysis</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*grMpmxyjDGRzlh_uOy7SHw.png" /></figure><p><em>Written by </em><a href="https://www.linkedin.com/in/alexmoen11/"><em>Alexander Moen</em></a><em>, </em><a href="https://www.linkedin.com/in/annguyenduy/"><em>An Nguyen</em></a><em>, </em><a href="https://www.linkedin.com/in/sohinapoddar/"><em>Sohina Poddar</em></a><em>, </em><a href="https://www.linkedin.com/in/rachelpytsui/"><em>Rachel Tsui</em></a></p><p><strong>Introduction and Objective</strong></p><p>Our group formed in the Machine Learning for Analytics course in our UCI MBA program. This post covers our final class project. We were interested in investigating something that could potentially have a positive social impact. Our group stumbled across data made freely available by the City of Seattle.</p><p>More specifically, we uncovered a police crisis dataset. Some of the information contained therein included information about crisis call type, the use of force indicator, geographic locations, demographics of police officers, and more. With all of this information at hand, it seemed to fit the bill.</p><p>The protests earlier this year related to police brutality or excessive use of force were put in the front and center by media. Rising tensions and mistrusts with the police have been on the minds of many citizens. Public safety is obviously important; however, transparency around police practices, including the use of force, could benefit from some transparency and analysis. What is really going on here? And it is also important for citizens to gain an understanding and trust with what is going on.</p><p>With our project, we hope to accomplish the following objectives:</p><ul><li>Determine whether certain situations are more likely to end in the police using force</li><li>Provide recommendations and insights for the police to better staff, train, and serve</li></ul><p><strong>Dataset</strong></p><p>The data source was procured from the City of Seattle website. It has 68,552 observations from 2015 to 2020 with 25 attributes. We selected as our dependent variable to investigate as the Use of Force indicator. This column had binary indicators (marked 0 or 1- either force was used or it was not) that were applied across 67,213 instances.</p><p><strong>Data Analysis</strong></p><p>Before jumping into modeling, here is an overview of some of the preliminary data analyses.</p><p><strong>Crisis calls by Precinct, as well as by hour and day of the week:</strong> crisis calls are clearly already heavily skewed towards occurring in Northern and Western areas of Seattle, with about 21.62% and 24.88% of the total instances, respectively. Additionally, the data provided timestamps, allowing for more generic views of crisis occurrences across general days of the week and times.</p><p>It can be clearly seen that around 6pm on Tuesday through Friday, there are heavier quantities of crisis calls being made. Conversely, from 4am to 9am in general tends to have fewer crises reported.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*pbwC_y7wn4-xfm23w-BlNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*OnjGLF98LajVBn4-RCXE7w.png" /></figure><p><strong>Use of Force by Officer age and years of experience: </strong>The data provided general officer data, such as date of birth and when they joined the police force. When applying the birth date to the date of the incident responded to, we were able to generate information about the age of the officer at the time they responded to each crisis call. Furthermore, knowing their age at the time of the incident and what age they joined the police force, we could also determine how many years of experience they had at that encounter as well. Clearly, the use of force was disproportionately wielded by younger officers with less experience. Most use of force incidents were done by officers between the ages of 26 to 36 and had 5 or fewer years of experience. This rough estimation holds true when looking at the overall composition of the police officers responding to these incidents as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*bF0__fLFInyVZaT_8FPYcg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*qdU_4Gd6zZuMQwzPq2nfRQ.png" /></figure><p>Although perhaps somewhat obvious that younger and lesser experienced officers might wield force more often, it does add credibility to the idea that additional quality training could reduce these numbers. It is not quite as simple as each scenario requiring or not requiring force. There seem to be nuances that are understood better by officers with additional experience.</p><p><strong>Unbalanced Dataset:</strong> The data set was highly unbalanced, with only 2% of instances utilizing force (indicated as a 1 in the graph), versus 98% of instances going without force of any kind. This means that the data will require special handling if we are to gather any valuable insights. This is because, as an example, if we were to state that use of force never happens, we would have an algorithm that is 98% correct. And, that number seems really high, but that diagnosis is of no use whatsoever. We will get into what we did to counter this imbalance later on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*Wf-CnrlSm9hrphl8UcTmZA.png" /></figure><p><strong>Large Dataset</strong>: For anyone wanting to work with this dataset themselves, the 68,522 instances, with 25 attributes (with some attributes having 100s of variables), it can take a while or cause complete crashes. We used WEKA for our data analysis and some of our team’s computers would constantly get heap memory errors whenever models were run. Other members needed their computer to run for 12 hours for initial data analysis. After determining which attributes were relevant or not, we were able to cut down on those columns. We were also able to test smaller subsets of data as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*nDuebmIPNU9fGR3TKrIqrg.png" /></figure><p><strong>Modeling Process</strong></p><p>The Seattle Crisis dataset can be downloaded with the following attributes, descriptions of the attributes, as well as the type of data each one is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*Bf_YMtRMYzlUBHMlxqonpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*aT1d2EaOx1zn3LKYmM9Ldg.png" /></figure><p>In WEKA, most of these attributes were converted to the nominal type. Nominal data is essentially data that is labeled as a variable but has no quantitate values and no order of “best to worst” or anything of that nature. Officer Years of Experience, and our additions of Officer Age at Incident, and Officer Age hired were all numeric data types. We normalized those numeric data types as well. The Officer Gender was binarized as well, to be 1 for males and 0 for females. The time stamps were with the associated date data type.</p><p>We ran a couple of different analyses on WEKA. Our preliminary algorithms utilized information about the officers, the first classification of the call at the time of dispatch, and the result after the incident. Originally, we wanted to ensure a hindsight bias was not included in any of the data. Hindsight bias essentially means that if data were obtained after the incident, then it would not be available before the incident, and therefore our algorithms would be unrealistic and not as useful in certain situations.</p><p>Further attributes that we found to be less valuable and removed, included: Officer ID, Gender, Race, and Officer Squad. Certain squads would be more likely to respond to certain situations that would inherently be more or less likely to use force, so we removed that to see if we could garner more generally useful information.</p><p>For our first pass, we resampled the observations to balance our dataset. Meaning, the data was manipulated to have equal quantities of instances of force being used and not being used. This, as described earlier, is to pull genuinely useful information when creating an algorithm, rather than simply being satisfied with high accuracy. The resulting dataset had two sets of 34,276 observations; 1 set for the 0 and 1 as applied to the Use of Force Indicator.</p><p>With this reformed dataset, we separated our training data from our test data by means of 10 k-fold cross validation. This essentially means that the data was then further split into 10 groups. 9 of these groups were used to train our algorithm and the 10th was used to test against, and the training and tests sets swapped 10 times total and then averaged the results.</p><p>With these training and test sets we performed logistic regression, decision tree, and random forest analyses. Logistic regression managed to accurately estimate use of force 69% of the time. However, this was lower than the other two methods. Applying decision tree and random forest methods we achieved higher accuracy. The decision tree had just over 97% accuracy. However, the random forest was able to 100% correctly predict incidents resulted in the use of force. We concluded that that our model is overfitting to the dataset and that there was an issue with the sampling data selected.</p><p>For our second pass, we decided to resample our data. The new dataset utilized all 1,339 observations of use of force and then selected a subsample of the incidents without force being used. Of course, we would have to run future tests to ensure that a similar sampling error didn’t occur, but the assumption is that the most valuable information is in the times where force was used, and therefore we should ensure a method that utilizes all of them in the proper proportions.</p><p>With this new data, we first analyzed the information gained from each of the remaining attributes. So, we calculated the gain ratio for our remaining attributes. Through another 10-fold cross-validation the information gain ratio results were then ranked, from best to worst, and came out as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*aiUxKLwDG5IFGuOZVdsV_w.png" /></figure><p>We utilized the same training and test methods and applied the same data science algorithms this time around as well: logistic regression, decision tree, and random forest. The top 8 attributes with the highest gain ratios were selected.</p><p>This time around random forest still came out with the best result. We picked out attributes based on the gain ratio ranking and found that the top eight attributes had the largest impact while also not making things overly difficult to understand.</p><p>Random forest had 78.49% accuracy with the top eight attributes and was able to accurately predict incidents resulted in the use of force with 84% accuracy. Class 0 error rate was 27% and class 1 error rate was 16%.</p><p>We also varied the non-use of force sub samples and re-ran our tests to ensure results were comparable across each run, in an attempt to remove any overfitting. The numbers remained steady.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*UWfjbdC1FnTDH4WIAcRHoA.png" /></figure><p>To improve both the model usefulness and accuracy, we adjusted the costs of each error type. We determined that to be useful, we had to consider the asymmetric costs for each error type. If we predicted a situation to not need force and it ended up requiring force, that situation would be worse than preparing for a situation with a high probability of force that ended up not using force.</p><p>By adjusting the cost of a false negative to be higher than a false positive, our model accuracy improved as well. At a 64.08% threshold, our model’s accuracy also improved to 82.34%. Class 0 error rate decreased to 25.54%, while class 1 error rate was decreased to 9.78%. Our selected attributes ranked by gain ratios are initial call type, officer’s age, officer’s years of experience, incident’s location (beat), veteran indicator, and call type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*A_zIl4duye58f9pYvhQkUA.png" /></figure><p><strong>Findings</strong></p><p>With our model, we could potentially predict the use of force before incidents of this type occur, particularly if all of this information were made available in real-time. The officer’s age and years of experience are also important factors deciding if an officer would use force in a crisis incident. The beat (a geographical section of the area) is also a highly contributing factor that aids in predicting the use of force by officers. One somewhat surprising finding was that use of force was used less frequently on subjects who police officers later identified as veterans. However, it’s important to note that this information wouldn’t be available until at least when an officer arrives at the scene.</p><p><strong>Potential Uses</strong></p><p>This information can help in a number of ways. Changes towards better allocating and tracking staffing resources is one possibility. Focusing on additional training, particularly for officers of certain ages and years of experience, would also be valuable. When multiple officers are available for particular types of calls in particular areas, the algorithm could determine who would be ideal to send and who would not. Also, by alerting officers to the likelihood of force being needed, officers can be made aware of it. Perhaps by being more conscious of the types of situations they are getting into they can mentally and physically prepare themselves to handle things in a more calculated manner that is more likely to lead to a positive outcome. Overall, this should lead to better use of current funds, more awareness of staff, and better overall experience for the citizens.</p><p><strong>Model Limitations</strong></p><p>First, we want to be specific again: this is just data for Seattle and for crisis situations. We do not have any data to show how this compares to other geographies and we do not have any other way to show what other places this may or may not apply to.</p><p>Also, we cannot comment on whether the use of force was warranted or excessive of racially insensitive, or the several other things that are making media headlines these days. Police officers undoubtedly must use force at times to ensure the safety of both other people and themselves. We can shine a light on the situations where that is happening, and we can do so with high levels of accuracy, but that’s about it.</p><p>One of the limitations of this model is also not having socioeconomic or racial data of the subjects of the police calls. Without this information we cannot glean any information about the likelihood of particular groups of people being more or less likely to find themselves in particular situations.</p><p><strong>What we would dig into, if possible:</strong></p><p>There is one key piece of information that Seattle likely either has or could piece together relatively easily. The data provides information about the officers and provides the officer IDs, but if there were a little bit more depth, a lot more value could come from it. If we could tie particular officer IDs to specific beats or specific work hours or specific squads, it would help tremendously. By having this data available, it would be easy to measure how an individual in their specific situation at their specific time handles a given situation. It would help flag potential officers that might need additional training. It would also be able to highlight officers that are regularly in situations where force could/would/should be applied but isn’t. This would essentially be verifying best practices and giving recognition to officers that are doing something different and useful and helping those positive actions spread more easily. Ultimately this is about better training and better service for the public and being able to set and measure benchmarks would be better for all parties involved.</p><p>If we could find datasets for other cities laid out in similar ways, we would be able to make these decision trees more robust and perhaps more useful as well. If other geographies start gathering and sharing data with similar attributes, it will give us a better idea of the nuances going on in police work. It would also help other cities and states compare to others. Right now, there may be best practices and benchmarks that aren’t getting shared and implemented simply because police departments have nothing to compare to and do not objectively know how things are handled elsewhere.</p><p>Additionally, getting accurate feedback from the Seattle Police about the true costs of false positive and false negative errors would make this more usable. This would likely require the police department to crunch some numbers involving resource availability and tying it into financial data.</p><p>And lastly, to add more validity, we would want to test our algorithms against future data releases. Seattle seems to release this data on a periodic basis, so if this model can map well to future data releases, then the results would be much more valuable. Although our algorithms underwent thorough testing, it’s not until this is tested against future crisis calls (and eventually in real-time) that the validity and confidence in this model can be solidified.</p><p><strong>Conclusion</strong></p><p>Hopefully this overview of our data has been insightful. Our goal is that this is digestible for people who hadn’t had the opportunity to dig in on this kind of data. Hopefully you take away at least a little bit more knowledge about both the general idea of use of force, but also when, where, and how often these sorts of things happen. This has been enlightening for us to go through and feel free to reach out to any questions.</p><p><strong>References:</strong></p><p><strong>Our data source: </strong><a href="https://www.seattle.gov/police/information-and-data/crisis-contacts/crisis-contact-dataset">https://www.seattle.gov/police/information-and-data/crisis-contacts/crisis-contact-dataset</a></p><p><strong>Our analysis tool: </strong><a href="https://waikato.github.io/weka-wiki/downloading_weka/">https://waikato.github.io/weka-wiki/downloading_weka/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37b680f3ce5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>