robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.1k stars 340 forks source link

Select the number of harmonics in the TBATS model #942

Closed MMenchero closed 1 year ago

MMenchero commented 1 year ago

I’ve been reviewing the code of the TBATS model and found that the approach based on multiple linear regression to select the number of harmonics in the TBATS model is no longer implemented. This approach is described in De Livera et al. (2011) and in this paper, the authors say that the multiple linear regression approach

is preferred over letting $k^*_i = 1$ for each component since the latter was found to be unnecessarily time consuming.

Could you please provide some clarification on why this approach was removed? For reference, here’s a fork where the multiple linear regression approach appears but it's not used (lines 93-114)."

robjhyndman commented 1 year ago

No idea. That code has been commented out for more than 10 years, and presumably was part of the code originally written by Alysha De Livera who was a PhD student working with me.

MMenchero commented 1 year ago

Thank you for your response. I'll try to get in touch with Alysha since I'm working on an implementation of the BATS and TBATS models in Python.

robjhyndman commented 1 year ago

There are at least three existing python implementations which might be helpful:

I've not used any of these. Also, the current R implementation in the forecast package is not particularly good. We plan to rewrite it from scratch for the fable package.