Adding time as a feature with xgboost/random forests I am trying to use xgboost for performing some regression and the features I have are rather simple and limited. I have the time stamp associated with some measurements. The measurements are customer counts and the dependent variable is predicting the average customer wait time. There is dependence on time of the day and weekends as well. For example, I notice that wait times are longer in thee afternoon than in the morning and evenings. There is also a dependency on weekday, holiday or weekends. So I also added a boolean variable to indicate whether the given day is a weekend or holiday or not.

The time data I have is in 10 minutes interval and is a regular python time stamp with the date, hours, minutes and second granularity. How should such time features be included with xgboost or random forests or indeed any such modelling paradigms?
You have already constructed features that indicate relevant events like weekday, holiday and so on, this is good. Create as many such features you can come up with.

As for the time of day, I'd try using the hour only and combination of hour+minute. Probably less important is the minute alone, unless there is something that causes spikes at the same times of every hour.

Since you use tree-based models, you don't need to normalize. Mark your time features as categorical (can you do that in xgboost? I forgot, but I think you can in lightgbm) or as boolean where applicablen. And then check feature importances, which you can with gradient boosted tree type of models.

Finally, make sure your validation splits are good, which can be a challenge whenever you have some kind of time involved. Make sure your don't leak information and that your validation set is representative.