Thank you very much for sharing,can you explain the purpose of this step!
tangyudi opened this issue · 2 comments
tangyudi commented
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
Not OP, but the purpose is to turn day of week into a cyclical feature, which is common with many time-based features.