Skip to content

amerob/ReservePredict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hotel Booking Cancellation Prediction App 🏨🚫

πŸ“… A Flask-based predictive app that analyzes hotel booking details to predict cancellation probability. Features optimization improved model accuracy by 8% πŸ“ˆ.

Try the app! πŸ“±

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.

Features πŸ”§

  • 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

Installation πŸ“

  1. Clone the repo:

    git clone https://github.com/amerob/ReservePredict.git
    cd ReservePredict
  2. Set up virtual environment:

    python -m venv venv
    source venv/bin/activate  # Windows: `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Add your predict_pipeline.pickle file to the root directory.

Usage πŸš€

  1. Run the app:

    python app.py
  2. Visit http://127.0.0.1:5000/ in your browser.

  3. Input features:

    • Type of Meal Plan 🍽️
    • Room Type Reserved πŸ›οΈ
    • Market Segment Type πŸ“Š
    • Lead Time πŸ•°οΈ
    • Average Price per Room πŸ’΅
    • Number of Special Requests ✨
  4. Get your result: The app shows the cancellation prediction and probability!

File Structure πŸ“‚

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

How It Works βš™οΈ

  1. Model: The model predicts cancellation probability based on input features.
  2. Input: Users input data via the form (meal plan, room type, etc.).
  3. Prediction: The app processes the input, feeds it into the model, and returns the cancellation likelihood and probability.

License πŸ“„

MIT License - see the LICENSE file for details.

About

πŸ“… A flask-based predictive app simulates real-time hotel booking decisions, analyzing factprs to predict cancellation probability. Optimizing features and hyperparameters improved accuracy by 8% πŸ“ˆ. Users input key features to get cancellation prediction 🚫

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors