← All projects

PROJECT 002 / 102 · Mobility

Next-day bike demand forecasting.

Can historical demand and calendar information improve next-day hourly rental forecasts?

End-to-end case studyBike sharingExecuted notebook
11.5%lower MAE than the selected previous-week baseline

THE RESULT

What the data shows

Gradient boosting reduces mean absolute error by 11.5% versus the previous-week baseline, from 68.09 to 60.26 rentals per hour.

The final holdout contains 2,888 observed hours from September–December 2012. The model still underpredicts by 28.18 rentals per hour on average.

Next-day bike demand forecasting — chart from the computed study output
Computed study output. Full values and units are available in the results download.
Computed results · 4 of 4 rows. Values rounded for display; source units and raw column names are retained in the download.
modelrowsmaermsewapebias
Calendar average2,88892.8137.30.3863-58.61
Previous day2,88879.63133.10.33151.628
Previous week2,88868.09115.80.283410.9
Gradient boosting2,88860.2696.360.2508-28.18
Download the complete result table ↓

Improvement is only part of the story

Lower average error does not remove the cost of underprediction. The exploratory daily bootstrap interval for the MAE reduction is 0.16–15.46 rentals per hour; it does not preserve dependence between consecutive days.

Mean absolute error for three baselines and gradient boosting
Baselines and final model on held-out dates.

THE METHOD

From source to answer

Calendar-aware lag features, three expanding-window validation blocks, and a fixed gradient-boosting model evaluated on later dates.

  1. Reindex 17,379 observations to a complete 17,544-hour calendar. Preserve 165 absent targets as unknown.
  2. Build lags at 24, 48, 168, and 336 hours, plus historical means and calendar features.
  3. Exclude realized target-hour weather and the casual/registered counts that reveal the target.
  4. Select a model and the strongest baseline in three expanding-window validation blocks.
  5. Fit on 14,167 pre-September observations and score once on later dates. Earlier test-day observations become available only to subsequent forecast days.

The Python source exposes this study’s transformations. The complete project download includes shared preparation and evaluation routines.

EVALUATION

How the result was checked

At midnight, predict the coming day’s 24 hours using finalized prior-day counts. The fixed model is evaluated over successive forecast days; this is not a single four-month forecast. MAE and RMSE are rentals per observed hour. WAPE is total absolute error divided by rentals.

THE NEXT DECISION

What follows from the finding

Compare against an operator’s current forecast, measure data latency, and define the relative cost of underprediction before an operational pilot.

Where the conclusion stops

The data measure realized system rentals, not unmet demand. Missing target hours are excluded from scoring. Historical data from 2011–2012 cannot establish current performance, station rebalancing benefits, or cost savings.

Related studies may reuse observations or holdouts. These are historical analyses; associations and backtests do not demonstrate commercial impact. Further model tuning needs new, untouched evaluation data.