I am trying to do a simple regression (either polynomial or support vector regression) for solar power prediction, as a project to learn machine learning. However the data I have is time series data of the following format:
| Year | Month of Year | Day of Month | Hour of Day | Temperature | Solar Power
Currently,
Month of Year = 1 to 12
Day of Month = 1 to 31
Hour of Day = 0 to 23
How do I incorporate the knowledge that January this year is as close to December last year as is it to February this year? Same goes for the hour of the day. Even if incorporating this knowledge may not be required for this particular case for solar power, I would still love to learn how.
I searched previous questions and found that, for something like an angle, we could incorporate the knowledge that 359 degree is close to 0 degree, by applying a sine function on angle data. I could possibly apply the same to my time variables by first scaling them to lie within 0 to 360 range, but I fear that it will introduce extra un-warranted knowledges (its slope is not constant, and it is symmetrical).
Any suggestions/comments on how to do this properly? Thanks.
Edit: More details
If I scale the hours from 0,24 to 0,180 and apply sine, then 0 will be close to 24. However, 1 will also be close to 23, 2 with 22, 3 with 21 and so on, which is unwarranted. Also, the rate of change is much faster around 0 and 180 degrees for the sine function, than around 90 degrees, which means, the difference between 23 and 0 hours is much more than between 11 and 12 hours.
Ideally, I would like to lay 0-24 in a ring (like in a watch), and have some function convert it into some numbers such that, the numerical difference between those numbers would be equal to distance between those numbers around the ring. I read the answer about using both cosine and sine, but its still over my head. Maybe the answer lies there. If yes, could you please explain a bit in this context, how that might solve the problem. Thanks.