🏨 Hotel Booking Cancellation Prediction Model
📌 Overview
This model predicts whether a hotel booking will be canceled or not based on customer behavior, booking details, and historical patterns.
It is trained on a real-world hotel booking dataset and designed to help businesses reduce revenue loss and improve operational planning.
🎯 Objective
Predict booking cancellation (is_canceled)
Assist hotels in proactive decision-making
Identify high-risk bookings
📊 Input Features
The model uses a combination of customer, booking, and pricing features, including:
lead_time → Days between booking and arrival
adr → Average Daily Rate (price per night)
previous_cancellations → Past cancellation count
deposit_type → Booking deposit category
total_stay → Total nights stayed (engineered feature)
total_guests → Number of guests (engineered feature)
📤 Output
0 → Not Canceled ✅
1 → Canceled ❌
🤖 Model Details
Algorithm: Gradient Boosting / XGBoost
Type: Binary Classification
Framework: Scikit-learn compatible
📈 Performance
Accuracy: ~0.85–0.90
ROC-AUC: ~0.90+
👉 Strong performance on structured tabular data
🧠 Key Insights Learned
Longer lead time increases cancellation probability
Non-refundable deposits drastically reduce cancellations
Returning customers are more reliable
Pricing (ADR) influences booking behavior
🚀 Usage Example
import joblib
import pandas as pd
model = joblib.load("model.pkl")
sample = pd.DataFrame({
"lead_time": [50],
"adr": [100],
"previous_cancellations": [0],
"deposit_type": ["No Deposit"]
})
prediction = model.predict(sample)
print(prediction)
⚠️ Limitations
Performance depends on data quality
May not generalize across all hotel types or regions
Requires proper preprocessing (same as training pipeline)
🔧 Future Improvements
Use CatBoost for better categorical handling
Add more behavioral features
Deploy as real-time API
👤 Author
Sarowar Ahmed
Data Science Enthusiast
Kaggle Competitor
⭐ Model Usage
If you find this model useful:
⭐ Like the repository
🔁 Share with others