1
$\begingroup$

I have been trying to perform Forecasting of a univariate Time Series Data with "daily" recorded observations and exhibiting an "annual" seasonality. The image below depicts the mentioned series: Log Transformed Time Series

While I have achieved success using Statistical Methods, I wish to compare the same with ML/DL Techniques. Following suggestions on this thread, I looked into the M5 Competition and the Winner's Submission, but soon realized something: Do Random Forest Models capture Large seasonality efficiently?

The submissions created variables on lagged values, rolling averages, date parts etc. but in order to capture Annual Seasonality they would require lags up to the order of 365; following SARIMA Order, maybe even more. So, how would you apply a Random Forest method in order to "capture seasonality" of such high order. While this is plausible by de-seasoning the series before ingesting in model, I was more curious to figure out how would one do so using only Random Forest! The same question expands to Neural Nets as well! Please share your opinions on the same!!

$\endgroup$
6
  • $\begingroup$ You could try a feature "value 1 year ago". $\endgroup$
    – Michael M
    Commented Oct 1, 2023 at 14:21
  • $\begingroup$ @MichaelM Thank you for replying! You see, there are at least 2 issues with a feature "Value 1 year ago": 1) There is too much granularity/specificity in that assumption; For instance, its like saying just because it rained the most on July 21st of 2021, the peak will reoccur on the same date for all the coming years. Instead, I believe ideally, a model should capture the essence of seasonality, which is like the sine curve in this case (July Rainfall Peak rather than 21st July peak). 2) Creating a lag like that would also mean giving up on a year's worth of data. $\endgroup$
    – jazz_razz
    Commented Oct 1, 2023 at 15:13
  • $\begingroup$ Perhaps try including a bunch of Fourier terms corresponding to yearly seasonality as in Hyndman "Forecasting with long seasonal periods". $\endgroup$ Commented Oct 1, 2023 at 15:33
  • $\begingroup$ @RichardHardy Thanks for the suggestion! I have actually achieved the desired results using DHR and TBATS, as the blog suggests, but didn't really thought of using Fourier Terms as Variables. However, I was more interested in knowing whether Decision Trees would be able to "pick up" the seasonality, based on the Time Series and a few other parameters, on its own. Regardless, I will definitely try out your suggestion, but before that, could you help me understand one thing; While Regressing on the Fourier Terms, is the objective to construct the Amplitude of each Fourier Term (finding Beta)? $\endgroup$
    – jazz_razz
    Commented Oct 1, 2023 at 16:59
  • $\begingroup$ @jazz_razz, yes, I think it is. And if some betas are estimated to be close to zero, perhaps these terms can be excluded. $\endgroup$ Commented Oct 1, 2023 at 17:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.