2

I have question that refers to both xgbar(forecastxgb package) and forecast function (forecast package). Usually, when I use object of class forecast I get both point prediction as well as confidence intervals, but not in this case:

model <- xgbar(train, seas_method = "fourier", maxlag=200, K = max(1, min(round(f/4 - 1), 10)))

fit_xgb <- forecast(model, h = weeks_predicted)

fit_xgb produces only point forecasts. Could you please let me know how can I get confidence intervals for forecast by xgboost method?

4

1 回答 1

0

当您使用 xgbar 对象进行预测时,npaths、PI 和模拟参数是否可用?我不熟悉那个包;但是,我认为模拟将是您的解决方案。

也许本文中关于神经网络的预测区间部分会对您有所帮助,因为 nnetar 函数将模拟用于置信区间。 https://otexts.org/fpp2/nnetar.html

于 2018-05-13T15:11:40.870 回答