Beginner
Open
Pro
Cyclical Encoding for a Ride-Demand Model
A ride-hailing demand model uses hour_of_day (0-23) as a raw integer
feature in a linear regression, and separately in a LightGBM model.
- Explain concretely what goes wrong for the linear model, using hour 23 and hour 0 as an example.
- Give the sin/cos encoding for hour 23 and hour 0 (24-hour period) and show that they are close in feature space.
- Does the LightGBM model have the same problem? Would you still add the cyclical features to it, and why or why not?
Share this question