encoding datetime features .. label or onehot? I am working on a cab booking prediction problem where I need to use datetime aspects like hour,day ,week etc for prediction. As I need to do categorical encoding for the purpose. can anyone help me out on which one to use i.e label encoder or one hot encoder. I am not able to gather much information on the web regarding this. I tried doing label encoding but as onehotencoding is preferred for ordinal data like this. Any help would be appreciated.
One hot encoding removed the order information compared to the label encoder. Which one to use depends on the specific question. If you think the order of categories matters, use the label encoder. If not, use the one-hot encoder. For booking prediction, I will prefer one hot.