I need to build a demand forecasting model for a retail client using historical sales data. In the past, I used the forecast package, but I keep hearing about fable and prophet. Which one should I prioritize learning for professional use in 2024? I need something that handles seasonality, holidays, and produces clear visualization of the predicted intervals.
3 answers
The forecast package is a classic, but the "tidyverts" ecosystem (especially the fable package) is the future of time series in R. It follows tidy data principles, making it much easier to handle multiple time series at once using "mables" and "fables." For retail, fable is excellent because it includes ARIMA, ETS, and even neural network models. If you have very messy data with strong holiday effects, Facebook’s prophet is very robust and requires less manual tuning of parameters, though it can sometimes be a bit of a "black box" compared to traditional statistical methods.
Does your retail dataset have a lot of outliers or missing days? Some models like ARIMA can be quite sensitive to gaps in the timeline, whereas prophet handles missing data by design. How much pre-processing have you done?
Don't overlook the timetk package! It’s fantastic for feature engineering and converting time series into a format suitable for machine learning.
Good call, Mary. timetk is my go-to for visualizing seasonality and creating lag features before I feed them into an XGBoost model.
William, the data is actually quite clean but very "noisy." I’ve found that using the tsibble package for data prep helps a lot. It forces you to define the time index clearly, which prevents a lot of common errors in forecasting. I'm planning to try a hybrid approach—using prophet for the baseline and then checking it against a damped-trend ETS model in fable to see which has the lower MAE.