Data science thesis / portfolio study predicting whether an LAPD crime report looks violent or non-violent, using public Los Angeles crime data (roughly 2020–2024).
Start here if you’re not a Python person:
Friendly study explainer (open in browser) — plain-English summary of the question, data, pipeline, and verified results.
| Model | Accuracy | Notes |
|---|---|---|
Random Forest (n_estimators=100) |
~87.6% | Best overall; violent-class F1 ≈ 0.69 |
| Neural net (Keras MLP) | val ≈ 87.4% | Close to the forest on overall accuracy |
| Logistic Regression | ~81.9% | Strong on non-violent; weak violent recall (~0.20) |
Unsupervised (2024 subset): K-Means silhouette 0.554 vs DBSCAN 0.443 on UMAP embeddings.
Full tables, caveats, and how to read the notebook: docs/study-explained.html.
- Notebook:
LAPD_Crime_ML_Models.ipynb - This docs pass did not change the notebook. The
.ipynbremains the canonical code + metrics source.
- Open in Colab (optional — run in the browser)
- Presentation
- LAPD Crime Data (City of LA)
- Clean & explore ~963k public incident rows
- Build a violent / non-violent label and engineered time/area/victim/weapon features
- Unsupervised structure discovery on the 2024 slice (PCA, UMAP, K-Means, DBSCAN)
- Supervised models + a small deep-learning network
- Interactive prediction playgrounds in the notebook
Diego Cabezas — data science thesis / portfolio piece.