{"id":28628048,"url":"https://github.com/kunalgarglibra/hotel_reservation_prediction","last_synced_at":"2026-07-18T08:38:04.381Z","repository":{"id":287321613,"uuid":"964339733","full_name":"kunalgarglibra/Hotel_Reservation_Prediction","owner":"kunalgarglibra","description":"This project aims to predict whether a hotel booking will be canceled based on various customer and reservation-related features. By leveraging machine learning techniques and modern deployment practices, the solution enables proactive management of hotel reservations to improve operational efficiency.","archived":false,"fork":false,"pushed_at":"2025-04-26T17:33:52.000Z","size":4288,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-07-18T08:37:42.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kunalgarglibra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-11T04:08:31.000Z","updated_at":"2025-04-26T17:37:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e20c1d0-9ac1-413f-a7ed-873c27a82f54","html_url":"https://github.com/kunalgarglibra/Hotel_Reservation_Prediction","commit_stats":null,"previous_names":["kunalgarglibra/hotel_reservation_prediction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kunalgarglibra/Hotel_Reservation_Prediction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunalgarglibra%2FHotel_Reservation_Prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunalgarglibra%2FHotel_Reservation_Prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunalgarglibra%2FHotel_Reservation_Prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunalgarglibra%2FHotel_Reservation_Prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kunalgarglibra","download_url":"https://codeload.github.com/kunalgarglibra/Hotel_Reservation_Prediction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunalgarglibra%2FHotel_Reservation_Prediction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35612560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T10:11:06.468Z","updated_at":"2026-07-18T08:38:04.363Z","avatar_url":"https://github.com/kunalgarglibra.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏨 Hotel Reservation Prediction\n\nThis project aims to predict whether a hotel booking will be canceled based on various customer and reservation-related features. By leveraging machine learning techniques and modern deployment practices, the solution enables proactive management of hotel reservations to improve operational efficiency.\n\n---\n\n## 🔍 Problem Statement\n\nHotel booking cancellations lead to significant revenue losses and poor resource planning. This project helps hotels **predict the likelihood of a booking being canceled** based on customer behavior, booking patterns, and preferences.\n\n---\n\n## 📊 Features Used\n\n### Categorical Columns\n- `type_of_meal_plan`\n- `required_car_parking_space`\n- `room_type_reserved`\n\n### Numerical Columns\n- `no_of_adults`\n- `no_of_children`\n- `no_of_weekend_nights`\n- `no_of_week_nights`\n- `lead_time`\n- `arrival_date`\n- `avg_price_per_room`\n- `no_of_special_requests`\n\n---\n\n## 🧠 ML Workflow\n\n### 1. **Data Infrastructure Setup**\n- Data stored and maintained in a **Google Cloud Storage (GCP Bucket)**.\n\n### 2. **Development Environment**\n- Codebase built using **VS Code** with Python.\n- Versioning via **GitHub**.\n\n### 3. **Data Ingestion**\n- Data pulled directly from GCP Bucket into local development environment.\n\n### 4. **Exploratory Data Analysis (EDA) \u0026 Preprocessing**\n- **Univariate \u0026 Bivariate Analysis** to explore data trends.\n- **Label Encoding** for categorical features.\n- **Variance Inflation Factor (VIF)** to detect multicollinearity.\n- Handling **skewness**, **imbalanced datasets**.\n- **Feature selection** using RandomForest importance scores.\n\n### 5. **Model Selection**\nModels compared based on key metrics:\n- ✅ Accuracy  \n- 📌 Precision  \n- 🔁 Recall  \n- 🎯 F1 Score\n\n**Models Tested**:\n- Random Forest (RF)\n- Gradient Boosting\n- AdaBoost\n- Logistic Regression\n- Support Vector Classifier (SVC)\n- K-Nearest Neighbors (KNN)\n- Gaussian Naive Bayes (NB)\n- LightGBM (LGBM)\n- XGBoost (XGB)\n\n\u003cimg src=\"images/ModelChoosing.png\" alt=\"Comparing Models\" width=\"500\"/\u003e\n  \n\n✅ **Best Model**: `Random Forest Classifier`\n\n### 6. **Hyperparameter Tuning**\n- Using **RandomizedSearchCV** to optimize:\n  - `bootstrap`\n  - `max_depth`\n  - `min_samples_leaf`\n  - `min_samples_split`\n  - `n_estimators`\n \n\u003cimg src=\"images/Best_Param.png\" alt=\"Comparing Models\" width=\"500\"/\u003e\n\n### 7. **Model Training \u0026 Saving**\n- Final model trained and serialized using `joblib`.\n\n### 8. **Experiment Tracking**\n- Integrated **MLFlow** for tracking experiments, metrics, and models.\n\n### 9. **Pipeline Development**\n- Modular **training pipeline** created for scalability and reusability.\n\n### 10. **Version Control**\n- **Code Versioning**: Git + GitHub  \n- **Data Versioning**: GitHub + GCP bucket logging\n\n---\n\n## 🌐 User Interface\n\n### Flask Application\n- Built using Flask to interact with the trained model.\n- Accepts user input and predicts if the booking will be canceled.\n\n  \u003cimg src=\"images/AppUI_GCRLink.png\" alt=\"App UI\" width=\"500\"/\u003e\n\n---\n\n## 🚀 CI/CD Deployment\n\n### Containerization \u0026 Deployment Workflow:\n1. **Create virtual environment** using Jenkins pipeline.\n   \n   \u003cimg src=\"images/Jenkins_Container.png\" alt=\"My Jenkins Container\" width=\"500\"/\u003e\n   \n   \n3. **Dockerize** the project.\n   \n5. **Build Docker image** and push to **Google Cloud Container Registry (GCR)**.\n   \n   \u003cimg src=\"images/Jenkins_Pipeline.png\" alt=\"Jenkins Pipeline\" width=\"500\"/\u003e\n   \n7. **Deploy image** to **Google Cloud Run** for seamless scalability.\n  \n   \u003cimg src=\"images/GCR_Deployment.png\" alt=\"My Jenkins Container\" width=\"500\"/\u003e\n   \u003cimg src=\"images/ProjectImageGCR.png\" alt=\"My Jenkins Container\" width=\"500\"/\u003e\n\n---\n## 🛠️ Testing Application:\n\n  \u003cimg src=\"images/PredictionResultApp.png\" alt=\"My Jenkins Container\" width=\"500\"/\u003e\n\n\n\n## 🛠️ Tech Stack\n\n- **Python** 🐍  \n- **Scikit-learn**, **Pandas**, **NumPy**, **Matplotlib**, **Seaborn**  \n- **MLFlow** for experiment tracking  \n- **Flask** for UI/API  \n- **Docker**, **Jenkins** for CI/CD  \n- **Google Cloud Platform** (GCS, GCR, Cloud Run)  \n\n---\n\n## 📦 Dataset\n\nThe dataset used for this project can be accessed [here](https://www.kaggle.com/datasets/ahsan81/hotel-reservations-classification-dataset) on Kaggle.\n\n---\n\n## 🙏 Acknowledgements\n\nThis project is part of a course taught by **Sudhanshu Gusain** on **udemy.com**.  \nThanks to the instructor for a practical, hands-on approach to solving real-world ML problems!\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunalgarglibra%2Fhotel_reservation_prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunalgarglibra%2Fhotel_reservation_prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunalgarglibra%2Fhotel_reservation_prediction/lists"}