Skip to content

About

Feature Engineering Capstone StaySmart Hotels — Cancellation Prediction

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

🏨 Feature Engineering Capstone — StaySmart Hotels

BITS Pilani | B.Sc. Data Science & AI | Graded Assignment 1 (Week 7)

📋 Assignment Overview

End-to-end feature engineering on the Hotel Bookings dataset to predict is_canceled (binary classification).

🗂️ Repository Structure

FeatureEngineering_Capstone.ipynb   ← Main notebook (all 8 tasks + final comparison)
requirements.txt                    ← Python dependencies
README.md                           ← This file
/src/
  helpers.py                        ← Reusable helper functions & pipeline utilities
/report/
  Report.pdf                        ← Final report with graphs and explanations

🚀 How to Run

Option 1 — Google Colab (Recommended)

Click the Colab badge at the top of the notebook, or open FeatureEngineering_Capstone.ipynb directly in Colab. The notebook downloads the dataset automatically from a public URL — no setup required.

Option 2 — Run Locally

# 1. Clone the repo
git clone https://github.com/<your-username>/FeatureEngineering_Capstone.git
cd FeatureEngineering_Capstone

# 2. Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Launch Jupyter
jupyter notebook FeatureEngineering_Capstone.ipynb

📊 Dataset

Hotel Bookings Dataset — automatically loaded from:

https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-02-11/hotels.csv

No manual download needed.

✅ Tasks Covered

Task Description
Task 1 Baseline model + "What is a Feature?"
Task 2 Curse of Dimensionality demo
Task 3 Numeric preprocessing (binning, binarization, scaling)
Task 4 Distance/proximity metrics & scaling impact on KNN
Task 5 End-to-end sklearn Pipeline with ColumnTransformer
Task 6 Feature extraction (datetime, text/TF-IDF, categorical encoding)
Task 7 Feature construction (ratios, interactions, aggregations, polynomial)
Task 8 Feature importance (RF, MI, Permutation) + filter selection
Final Before vs After comparison table + Executive Summary

📈 Key Results

Version Features ROC-AUC
Baseline 16 ~0.87
After Preprocessing 6 (scaled) ~0.85
After FE 31 ~0.93+
After Selection (Top 20) 20 ~0.93+

About

Feature Engineering Capstone StaySmart Hotels — Cancellation Prediction

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages