Author: Ibrahim Malik
This project builds a machine learning model to predict hourly bike rental demand using the Kaggle Bike Sharing Demand dataset. The objective is to minimise prediction error (RMSLE) using automated model selection, feature engineering, and hyperparameter optimisation.
Accurately forecasting bike rental demand enables better operational planning and resource allocation. The dataset contains hourly records of bike rentals along with weather, seasonal, and calendar-related features.
The goal is to predict the count of bike rentals for unseen test data.
The project was completed in three main stages:
- Used AutoGluon TabularPredictor with default settings
- Evaluation metric: RMSE (local) and RMSLE (Kaggle)
- Best local RMSE: 53.01
- Kaggle RMSLE: 1.80
- Extracted
hour,day,month, andyearfromdatetime - Performed exploratory data analysis
- Improved model performance significantly
Results:
- Local RMSE: 37.44
- Kaggle RMSLE: 0.48
- Tuned:
num_stack_levelsnum_bag_foldstime_limitnum_trials
- Applied custom hyperparameter configurations for RF, GBM, and XGBoost
Final Results:
- Local RMSE: 41.21
- Kaggle RMSLE: 0.46
The best-performing model across experiments was a WeightedEnsemble_L3.
bike-sharing-demand-autogluon/
βββ data/
β βββ sampleSubmission.csv
β βββ test.csv
β βββ train.csv
βββ figures/
β βββ model_test_score.png
β βββ model_train_score.png
β βββ sagemaker-studio-git1.png
β βββ sagemaker-studio-git2.png
βββ notebooks/
β βββ bike_sharing_demand_autogluon.ipynb # Main development notebook
βββ submissions/
β βββ baseline_predictions.csv
β βββ feature_engineered_predictions.csv
β βββ hpo_predictions.csv
βββ .gitignore
βββ LICENSE
βββ README.md
βββ REPORT.md
βββ requirements.txt
Install dependencies:
pip install -r requirements.txtOpen the notebook:
jupyter labRun all cells in:
notebooks/bike_sharing_demand_autogluon.ipynb
- Feature engineering had the largest impact on model performance.
- Ensemble stacking improved the Kaggle score despite slight local metric degradation.
- Additional compute and deeper stacking could further improve performance.
Originally completed as part of the Udacity AWS Machine Learning Engineer Nanodegree. Refactored and documented for portfolio presentation.