Time Series Forecasting Project.

Sweet Lift Taxi wanted to predict peak demand hours near the airport to strategically attract more drivers during busy times.
The goal was to build a model capable of forecasting hourly ride requests with precision.

  • CLIENT:

    Sweet Lift Taxi

  • DATE:

    May 30, 2025

  • PROJECT:

    GitHub

Data Preparation and Exploration

The data was first arranged in chronological order and checked for duplicates or missing values. Since the dataset provided ride counts in 10-minute intervals, I resampled the data by hour using a sum aggregation to reflect the total number of orders per hour. To better understand daily trends, I applied a 6-hour rolling mean, effectively dividing each day into four time segments representing different levels of activity.

A 15-day sample window was then visualized to identify recurring patterns in demand. Through seasonal decomposition, I separated the data into trend, seasonality, and residual components. The analysis revealed a steady upward trend beginning around August and clear daily peaks and low-demand hours, though long-term seasonality diminished over time.

Feature Engineering and Modeling

To enhance predictive power, I engineered several time-based features:

  • Month, day, and day of the week to capture temporal effects
  • Lag features (up to 4 previous hours) to incorporate short-term dependencies
  • Rolling mean of 4 to smooth recent fluctuations

Findings

These features were standardized using a pipeline with StandardScaler and then fed into multiple regression models. After hyperparameter tuning and cross-validation, XGBoost outperformed all other models with an RMSE of 24.61, providing precise and computationally efficient predictions for hourly ride demand.