Predict bike demand and avoid overfitting
Two SigmaData Scientist · Technical ScreenLast updated
This question evaluates time-series forecasting, feature engineering, awareness of data leakage risks, model evaluation choices, and overfitting prevention competencies within the Machine Learning domain applied to demand prediction.
You are given historical data for a city bike-sharing system. Available fields include station_id, hourly timestamp, number of bike pickups and returns, dock capacity, current bikes available at prediction time, weather, holidays, and nearby transit or event signals.
Design a model to predict the number of bike pickups from a specific dock during the next hour.
Discuss:
- how you would define the target and avoid data leakage;
- what features you would engineer from temporal patterns, station behavior, weather, and geography;
- what train/validation/test strategy you would use for this time-dependent problem;
- which evaluation metric(s) you would choose (for example, MAE, RMSE, Poisson deviance, or a downstream empty/full-dock metric) and the trade-offs;
- how you would detect and prevent overfitting.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.