Interview Query
~4 hrs
AnalyticsMachine Learning

BuildZoom Electrical Permit Binary Classifier

Build a binary classifier to predict whether a building permit's 'type' field is 'ELECTRICAL' using a training set of about 100k labeled permits, then apply it to about 25k unlabeled test permits.

BuildzoomBuildzoom
Data ScientistML Engineer
Updated 3 days agoReviewed byIQIQ Team

Overview

You are provided with building permit data similar to what is used at BuildZoom. Your task is to build a binary classifier that predicts whether a building permit's type is 'ELECTRICAL' or not, then apply it to an unlabeled test set.

Data

Training data — train_data.csv

Contains 100,156 rows, each representing a building permit. There are 7 variables:

ColumnDescription
licensetypeType of contractor license
businessnameName of the business
legaldescriptionLegal description of the property
descriptionDescription of the permit work
typePermit type — this is the target label (includes 'ELECTRICAL' and many other types)
subtypePermit subtype
job_valueDollar value of the job

Test data — xtest_data.csv

Contains 25,149 building permit observations with the same 6 variables as above except the type column, which is omitted. This is the unlabeled data you must classify.

Tasks

  1. Build a classifier that predicts whether a building permit's type is 'ELECTRICAL' or not. Note that there are many different types of permits, but you are only interested in 'ELECTRICAL'. You are free to use any algorithm(s). You are also free to use all or a subset of the available features.

  2. Apply your classifier to predict whether each building permit in xtest_data.csv is 'ELECTRICAL' or not.

Deliverable

Submit a single PDF containing:

  • Your Python code, written in Python and commented appropriately to justify your feature selection, model choice(s), validation approach, etc. The code must be fully executable (runnable) so that it can regenerate all outputs. It should read the data using the following path structure:
    • ./data/train_data.csv
    • ./data/xtest_data.csv
    • And write its prediction results to ./data/y_pred.csv
  • Your predictions for xtest_data.csv: a single column of binary values (0 or 1), one per row, in the same order as the rows of xtest_data.csv. A value of 1 means the permit is predicted to be 'ELECTRICAL'; a value of 0 means it is not.
  • A short write-up (optional but encouraged) highlighting your work. For example, you may identify something you found particularly challenging and how you tackled it, or what avenues you might pursue given substantially more time.

Ideally your code and comments should tell a complete story, but you are welcome to include a short narrative note as well.

Good luck and have fun!

Download project files