BITS Pilani | B.Sc. Data Science & AI | Graded Assignment 1 (Week 7)
End-to-end feature engineering on the Hotel Bookings dataset to predict is_canceled (binary classification).
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
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.
# 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.ipynbHotel Bookings Dataset — automatically loaded from:
https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-02-11/hotels.csv
No manual download needed.
| 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 |
| 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+ |