π A Flask-based predictive app that analyzes hotel booking details to predict cancellation probability. Features optimization improved model accuracy by 8% π.
You can try the it live by clicking here.
Note: The app is deployed on a platform where the deployment includes a limitation of 10 free sessions. If the app is not working, it's likely because the session limit has been reached.
- Predicts hotel booking cancellation likelihood.
- User-friendly web form for inputting key features.
- Provides real-time cancellation prediction & probability.
- Explored and Pruned Random Forest, LightGBM for Recall Optimization
- Randomized Search adn Optuna for Hyperparameter Tuning:
- Dynamically Adjusting Threshold to Visualize Performance
-
Clone the repo:
git clone https://github.com/amerob/ReservePredict.git cd ReservePredict -
Set up virtual environment:
python -m venv venv source venv/bin/activate # Windows: `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Add your
predict_pipeline.picklefile to the root directory.
-
Run the app:
python app.py
-
Visit
http://127.0.0.1:5000/in your browser. -
Input features:
- Type of Meal Plan π½οΈ
- Room Type Reserved ποΈ
- Market Segment Type π
- Lead Time π°οΈ
- Average Price per Room π΅
- Number of Special Requests β¨
-
Get your result: The app shows the cancellation prediction and probability!
hotel-booking-cancellation-prediction/
β
βββ app.py # Flask app
βββ predict_pipeline.pickle # Trained model
βββ templates/
β βββ index.html # Frontend HTML
βββ requirements.txt # Python dependencies
βββ Aptfile # System dependencies for deployment
βββ Procfile # Specifies how to run the app (used by platforms like railway and Heroku)
βββ README.md # This file- Model: The model predicts cancellation probability based on input features.
- Input: Users input data via the form (meal plan, room type, etc.).
- Prediction: The app processes the input, feeds it into the model, and returns the cancellation likelihood and probability.
MIT License - see the LICENSE file for details.