You need both sin and cos variables to replace a cyclical features because a given value of sin(x) corresponds to 2 values of X. Same thing for cos(X). If you use sin(X) and cos(X), there is only one value of X implied (within [0, 2 pi]).
This way you need only 2 trigonometric signals to replace 23 dummy variables (and not 24) for the hour of the day.
Fourier and.Fast Fourier Analysis is used in engineering to decode cyclic data of tides and waves for many years.
You need both sin and cos variables to replace a cyclical features because a given value of sin(x) corresponds to 2 values of X. Same thing for cos(X). If you use sin(X) and cos(X), there is only one value of X implied (within [0, 2 pi]).
This way you need only 2 trigonometric signals to replace 23 dummy variables (and not 24) for the hour of the day.
AKA, "State Table" (from my digital engineering days)