I have a regression data set and I'm trying to do some feature engineering.
The data set is foot fall coming into a store measured on the hour.
I'd like to include the time of measurement as a feature and I think that mapping the time of day onto a cosine curve should do this.
The target (in_coming) peaks at around 2PM. However my cosine curve peaks at 12PM. I think that this isn't a problem for neural networks as the bias values should easily be able to introduce a phase shift to the time feature aligning it with the peak of the in_coming. I think that if I manually tried to move this peak during feature engineering it would be passing information about the target values behaviour into the training data. So i will leave the cosine peak where it is.
However, I'm not sure if a decision tree can compensate for this offset in a similar way? It's likely that I will end up investigating the use of XGBoosted regression decision trees so would like to know if the time-cosine feature makes sense with trees or whether I should use some other method for time.