All projects
AI & ML

Demand forecasting

EcoMoveUS

Built a regression workflow to forecast bike-rental demand from weather, calendar, and temporal features, supporting fleet and staffing decisions.

Random Forest: R² 0.941 · RMSE 50.24

Executive summary

EcoMoveUS needed to forecast bike-rental demand ahead of time to plan fleet rebalancing and staffing, rather than reacting after demand had already been missed. I cleaned and feature-engineered weather, calendar, and temporal data, then benchmarked a linear regression baseline against a Random Forest ensemble. Random Forest explained 94.1% of demand variance versus 41.5% for the linear baseline, with hour of day standing out as the single dominant driver.

The problem

EcoMoveUS needed to anticipate bike-rental demand ahead of time so it could plan fleet distribution and staffing, instead of reacting to demand after it happened and losing rides to empty stations.

The outcome

Trained and compared regression models on weather, calendar, and temporal features; the Random Forest model explained 94.1% of demand variance (R² 0.941, RMSE 50.24), giving a reliable forecast to plan fleet and staffing decisions around.

1. Data cleaning

Range checks on temperature, humidity, and wind speed; removal of invalid records and outliers.

2. Feature engineering

Expanded hour, weekday, season, and business-day fields; added interaction terms (Hour × Temperature, Temp × Humidity); one-hot encoded categorical variables.

3. Modelling

80/20 train-test split (random_state=42); Linear Regression baseline versus Random Forest (100 estimators).

4. Evaluation

Compared RMSE and R² on the held-out test set, then reviewed feature importance for interpretability.

Model comparison

variance explained · higher is better

Linear Regression
0.415
Random Forest
0.941

RMSEprediction error · lower is better

Linear Regression
157.63
Random Forest
50.24

Feature importance

Hour of day
68.5%
Temperature (°C)
7.9%
Business day
7.0%
Feeling temperature (°C)
4.0%
Season: Winter
2.0%
Humidity (%)
2.0%

Architecture

Average rentals by weekday and hour, from the exploratory analysis — the morning and evening commute peaks are the main driver the model picks up on.

Average rentals by weekday and hour, from the exploratory analysis — the morning and evening commute peaks are the main driver the model picks up on.

PythonPandasScikit-learnRandom Forest