Predictive Analytics
Hotel cancellation risk
A classification model that predicts whether a hotel booking will be cancelled. I wrote it up for a revenue manager deciding how far to overbook and which bookings to follow up before arrival.
- Context
- UCL Predictive Analytics, individual coursework
- Date
- March 2026
- Team
- Individual
- Stack
- Python, pandas, scikit-learn, matplotlib, seaborn, SHAP
The problem
An empty room and an overbooked guest both cost the hotel money, so missed cancellations and false alarms both matter. The classes were also imbalanced. For both reasons I used F1 as the main metric rather than accuracy.
Approach
Exploratory analysis pointed to lead time, deposit type and market segment as the main factors. I checked for multicollinearity with a Spearman correlation heatmap and handled columns that were mostly empty.
The train and test splits were fixed and kept apart so no information leaked from one into the other. I compared several classifiers, tuned the strongest, and set the decision threshold to maximise F1 rather than leaving it at the default.
I used an AI agent to scaffold parts of the pipeline, with explicit checks for leakage and fixed random seeds.
Result
The final model reached an F1 score of approximately 0.85. The SHAP summary below shows which features moved its predictions most.


