Hotel Cancellation Prediction
A model that predicts which hotel bookings will be cancelled, with a small form that gives staff the risk for a single booking.
The problem
Cancellations cost hotels money twice: the room stays empty, and the staff and stock planned for that guest are wasted. Booking systems record cancellations but don’t warn about them in advance. I wanted to see how well historical bookings predict the next cancellation.
What I built
I worked through the data in a Jupyter notebook:
- Analysis. Which features go with a cancellation: lead time, room category, earlier cancellations by the same guest, season.
- Features. Selected and transformed lead time, guest details, room preferences and the cancellation history so the models could use them.
- Model comparison. Logistic regression, a decision tree, k-nearest neighbours and a random forest, evaluated with cross-validation.
- Random forest. It did best on this data and stays explainable through feature importance, so I tuned that one.
- Prediction form. A web form where you enter a booking (length of stay, guests, lead time, price, room type and so on) and get the cancellation probability back.
What it shows
- Which booking details drive cancellations most
- A cancellation risk per booking, from the form
- The full workflow in one notebook, so it can be rerun and checked
Stack
Python, scikit-learn, pandas, Matplotlib and Seaborn, Jupyter.