Forecasting, Time Series Analysis, Fourier Transform, R, Ml So Good.
I will do. There is surely a limit to the number k, and you can find the optimal k like you find the optimal lambda in LASSO. But here, I just went for four, because I already know how many I want to include based on the periodogram shown above. fourier.calls <- tslm(TC_ts ~ trend + season +