Will the guest going to cancel hotel reservation?
-
Booking cancellations have a substantial impact in demand management decisions in the hospitality industry.
-
Cancellations limit the production of accurate forecasts, a critical tool in terms of revenue management performance.
-
To circumvent the problems caused by booking cancellations, hotels implement rigid cancellation policies and overbooking strategies, which can also have a negative influence on revenue and reputation.
-
Using data sets from four resort hotels and addressing booking cancellation prediction as a classification problem in the scope of data science
-
Results allow hotel managers to accurately predict net demand and build better forecasts, improve cancellation policies, define better overbooking tactics thus improve on inventory allocations.
Before we run the project, make sure that you are having MongoDB in your local system, with Compass since we are using MongoDB for data storage. You also need AWS account to access the service like S3, ECR and EC2 instances.
git clone my repository
conda create -p env python=3.8 -y
conda activate env
pip install -r requirements.txt
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
export AWS_DEFAULT_REGION=<AWS_DEFAULT_REGION>
export MONGODB_URL="mongodb+srv://<username>:<password>@ineuron-ai-projects.7eh1w4s.mongodb.net/?retryWrites=true&w=majority"
Before runnig server application make sure your s3
bucket is available and empty
### Step 5 - Run the application server
```bash
python app.py
http://localhost:8080/train
http://localhost:8080
-
Check if the Dockerfile is available in the project directory
-
Build the Docker image
docker build --build-arg AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --build-arg AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --build-arg AWS_DEFAULT_REGION=<AWS_DEFAULT_REGION> --build-arg MONGODB_URL=<MONGODB_URL> .
- Run the Docker image
docker run -d -p 8080:8080 <IMAGEID>
๐จโ๐ป Tech Stack Used
- Python
- FastAPI
- Machine learning algorithms
- Docker
- MongoDB
๐ Infrastructure Required.
- AWS S3
- AWS EC2
- AWS ECR
- Git Actions
- Terraform
- Logistic Regression
- KNeighbors Classifier
- XGB Classifier
- CatBoost Classifier
- RandomForest Classifier
From these above models after hyperparameter optimization we selected Top two models which were XGBRegressor and Random Forest Regressors and used the following in Pipeline.
-
GridSearchCV is used for Hyperparameter Optimization in the pipeline.
-
Any modification has to be done in Inside Config.yaml which can be done in route /update_model_config
Artifact : Stores all artifacts created from running the application
Components : Contains all components of Machine Learning Project
- DataIngestion
- DataValidation
- DataTransformations
- ModelTrainer
- ModelEvaluation
- ModelPusher
Custom Logger and Exceptions are used in the Project for better debugging purposes.
- It helps to save the resources and also helps to gain more profit from the business based on the study.
=====================================================================