Brief
A bike-share company has to decide how many bikes and staff to put out each morning. Too few and riders walk away. Too many and money sits idle. In this project you predict tomorrow's rental count from the weather and the calendar. This is your first machine-learning model, so the point is to do every step by hand and check it against scikit-learn.
The data is the Bike Sharing dataset from the UCI Machine Learning Repository. It holds two years (2011 and 2012) of
daily counts from Capital Bikeshare in Washington, D.C., with weather and calendar columns. Use the file day.csv.
You can also load it in Python with the ucimlrepo package.
The model is linear regression. Each prediction is a weighted sum of features: , or for all days at once. The best weights minimise the squared error and solve the normal equations . Ridge regression adds a penalty that keeps weights small, which changes the system to . You score the model with .
Two habits start here and last the whole track. First, split by time: you are predicting the future, so the test days must come after the training days. Second, always build a dumb baseline first. If your model can't beat "the average for this season", it hasn't learned anything useful.
DATA · UCI Bike Sharing
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- Your from-scratch model's test RMSE is within 0.1% of sklearn LinearRegression on the same features, and below the seasonal-average baseline. Record it with `python tools/mlarena.py record BL-01 "<your RMSE>"`.
- The test period comes strictly after the training period, and casual and registered are not features.
- The README shows a predicted-versus-actual plot for the test days and lists the five largest weights with a sentence on each.
Side quests
Terms in plain words
- Linear regression
- A model that predicts a number as a weighted sum of the input features plus a constant.
- Feature engineering
- Turning raw columns into inputs a model can use, such as splitting "season" into four yes/no columns.
- One-hot encoding
- Replacing a category with one 0/1 column per value, so the model doesn't treat "season 4" as twice "season 2".
- RMSE
- Root mean squared error. The typical size of a prediction miss, in the same units as the target (bikes per day).
- Test set
- Data you hide from training and use once at the end, so the score tells you how the model does on days it has never seen.