Arturus / kaggle-web-traffic

1st place solution
MIT License
1.82k stars 667 forks source link

Thank you very much for sharing,can you explain the purpose of this step! #11

Closed tangyudi closed 5 years ago

tangyudi commented 6 years ago

Thank you very much for sharing,can you explain the purpose of this step!

week_period = 7 / (2 * np.pi) dow_norm = features_days.dayofweek.values / week_period dow = np.stack([np.cos(dow_norm), np.sin(dow_norm)], axis=-1)

roerwod commented 6 years ago

Not OP, but the purpose is to turn day of week into a cyclical feature, which is common with many time-based features.

Arturus commented 5 years ago

@roerwod , thanks for explanation!