https://towardsdatascience.com/cyclical-features-encoding-its-about-time-ce23581845ca encodes a timestamp in terms of sin(x)
, cos(x)
. First, they map X
's "hour of day" and "day of year" to the range [0, 2*PI]
. Finally, they feed the value into sin()
and cos()
.
Given sin(x) = y
and cos(x) = z
, how do I get back the original "hour of day" and "day of year"?