Data science · June 2026 Academic project
Rain in data
33,024 hours of weather in four locations: regression, rain classification and segmentation with K-means and PCA.
Academic project · on request
K-means · K = 5
What it is
An integrated, end-to-end notebook: cleaning with explicit reasoning for nulls, duplicates and outliers; regression; rain classification; and segmentation of the hours of the year.
For operational safety, the recommendation was to lower the classification threshold: fewer unannounced rains, in exchange for a few false alarms.
33,024observations
0.9889regression R²
0.8939classification ROC-AUC
5segments (K-means)
What I built
- Linear regression with R² = 0.9889 and MAE = 0.287
- A decision tree for rain with ROC-AUC = 0.8939
- A 0.3 threshold: false negatives drop from 522 to 317
- Segmentation with K = 5 and PCA (66.51% of the variance in two components)
The hard parts
01
Choosing the error
At a 0.5 threshold the model is “better” on F1, but it misses more rain. The switch to 0.3 and its cost were documented.