Site Overlay

K-Nearest Neighbors, Part II

We decided to build a model to predict whether a stop would result in a frisk, rather than an arrest. Based on the results of the linear regression, there appears to be more variability regarding frisks, likely leading to a more interesting model. An arrest is a fairly objective decision that can be predicted based on the law. However, an officer has more discretion regarding whom to frisk, which would make a machine learning model that could predict human behavior potentially more interesting. Relying on the same dataset used in the linear regression, we built a K-Nearest Neighbors predictive modelContinue…K-Nearest Neighbors, Part II

K-Nearest Neighbors, Part I

According to Wikipedia: A Terry stop in the United States allows the police to briefly detain a person based on reasonable suspicion of involvement in criminal activity. Reasonable suspicion is a lower standard than probable cause which is needed for arrest. When police stop and search a pedestrian, this is commonly known as a stop and frisk. The City of Seattle, where Maderas Partners is based, publicly released data on each Terry Stop made by Seattle Police Officers since 2015. The data include information about the stop (date, location, reason), about demographic information about the officer and person stopped. TheContinue…K-Nearest Neighbors, Part I


The Difference-in-Difference (DiD) analysis is a powerful econometric tool with very practical uses. The classical use of DID is to analyze the difference between two groups after some sort of treatment. Say, for example, that you want to compare scores of a college entrance exam, the SAT, for two groups of students, one group that participated in an SAT prep course (the treatment group) and one group that did not (the control group) … Continue…Difference-in-Difference