Paths Subjects Questions Quizzes Pricing Search
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.

  1. Explain concretely what goes wrong for the linear model, using hour 23 and hour 0 as an example.
  2. Give the sin/cos encoding for hour 23 and hour 0 (24-hour period) and show that they are close in feature space.
  3. 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

← Back to Feature Engineering practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.