Detroit Blight Ticket Compliance: A Kaggle Project

This assignment is based on a data challenge from the Michigan Data Science Team MDST.That was also a part of Applied Data Science with Python Specialization offered by the University of Michigan via Coursera.

The Michigan Data Science Team MDST and the Michigan Student Symposium for Interdisciplinary Statistical Sciences MSSISS have partnered with the City of Detroit to help solve one of the most pressing problems facing Detroit – blight. Blight violations are issued by the city to individuals who allow their properties to remain in a deteriorated condition. Every year, the city of Detroit issues millions of dollars in fines to residents and every year, many of these fines remain unpaid. Enforcing unpaid blight fines is a costly and tedious process, so the city wants to know: how can we increase blight ticket compliance?

The first step in answering this question is understanding when and why a resident might fail to comply with a blight ticket. This is where predictive modeling comes in. For this assignment, your task is to predict whether a given blight ticket will be paid on time.

All data for this assignment has been provided to us through the Detroit Open Data Portal . You can also find the data on Kaggle.

You may also find data related to this project from the links below:

For this project, two data files are used for training and validating models: train.csv and test.csv. Each row in these two files corresponds to a single blight ticket and includes information about when, why, and to whom each ticket was issued. The target variable is compliance, which is True if the ticket was paid early, on time, or within one month of the hearing data, False if the ticket was paid after the hearing date or not at all, and Null if the violator was found not responsible. Compliance, as well as a handful of other variables that will not be available at test-time, are only included in train.csv.

Note: All tickets where the violators were found not responsible are not considered during evaluation. They are included in the training set as an additional source of data for visualization, and to enable unsupervised and semi-supervised approaches. However, they are not included in the test set.

  1. train.csv – the training set (all tickets issued 2004-2011)
  2. test.csv – the test set (all tickets issued 2012-2016)
  3. addresses.csv & latlons.csv – mapping from ticket id to addresses, and from addresses to lat/lon coordinates.
    Note: misspelled addresses may be incorrectly geolocated.

 

Evaluation

Your predictions will be given as the probability that the corresponding blight ticket will be paid on time.

For this assignment, I created a function that trains a model to predict blight ticket compliance in Detroit using `train.csv`. Returning a series of length 61001 with the data being the probability that each corresponding ticket from `test.csv` will be paid, and the index being the ticket_id.

Example:

ticket_id
284932 0.531842
285362 0.401958
285361 0.105928
285338 0.018572

376499 0.208567
376500 0.818759
369851 0.018528

Result

A model which with an AUROC of 0.7 passes this assignment. My AUROC score was 0.765279861777. Certification of completion.You’re welcome to view code at my GitHub.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s