HRP Stage 01 β Booking Cancellation Risk
A trained LDA (Linear Discriminant Analysis) probability model for educational prediction of hotel booking cancellation risk, plus a separately saved Logistic Regression classifier. Trained with synthetic HRP booking records; not production-validated.
Task: Given 42 booking-time features, estimate the probability of later cancellation. This is decision support only: do not automatically decline or cancel bookings based on this score.
Model selection and verified source scores
From the original results/final_test_metrics.json:
| Model | Selection basis | Test F1 | Test ROC-AUC |
|---|---|---|---|
| LDA probability model, tuned threshold 0.265 | Validation ROC-AUC | 0.6068 | 0.7234 |
| Logistic Regression classifier | Validation F1 | 0.5866 | 0.7228 |
The LDA pipeline applies its own fitted preprocessing internally, including imputation, scaling and one-hot encoding.
Synthetic training split: chronological 70/15/15, 15,000 rows total. The public companion Dataset has 42 feature columns, a non-input created_at, and target_cancelled.
Files
models/risk_probability_model.joblib: primary fitted LDA scikit-learn Pipeline.models/best_classifier.joblib: secondary fitted Logistic Regression Pipeline.models/preprocessor.joblib: separately stored preprocessing artifact from the original package; not applied a second time insrc/predict.py.models/model_metadata.json: 42 features and risk threshold.src/predict.py: input schema handling and prediction function.integration/request_example.json: complete synthetic 42-feature example request.results/final_test_metrics.json: original metrics.requirements_inference.txt: minimal inference dependencies.example_inference.py: runnable example.examples/risk_examples.json: three synthetic holdout examples spanning LOW / MEDIUM / HIGH risk bands.
Use in Google Colab / local Python
Load only trusted
.joblibfiles: joblib deserialization can execute Python code.
pip install -r requirements_inference.txt
python example_inference.py
# Or:
python -m src.predict integration/request_example.json
No retraining is required for inference. Input must contain the 42 model features exactly as named in models/model_metadata.json; extra keys are ignored, but missing required keys raise an error. created_at and target_cancelled are not model input features. The output includes cancellation probability, binary risk flag at 0.265, and LOW (<0.35) / MEDIUM (<0.65) / HIGH risk levels. A thresholded risk flag is not a guarantee of future cancellation.
Limitations and ethics
- This is an academic prototype trained on synthetic HRP-shaped bookings. It does not establish accuracy, fairness, or calibration on real-world bookings.
- No real HRP customer records are included in the released companion dataset.
- Do not use for automatic cancellation, rejection, customer penalties, or other adverse decisions.
- Re-train and evaluate on consented, verified booking-time snapshots and realized outcomes before production.
- Model binary artifacts should be loaded only in trusted environments.
Group collaboration
Student contributions should be submitted from each student's individual Hugging Face account using PRs/discussions/commit history; do not claim contributions that are not visible in repository history.