You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

R语言fable包未生成调和层次模型的Bootstrap预测区间问题

关于fable包调和模型bootstrap预测仅生成点估计的疑问

我正在使用R语言的fable包,测试将forecast(bootstrap = TRUE)用于调和层次单变量模型,代码如下:

tourism_hts <- tourism |>
  aggregate_key(State / Region, Trips = sum(Trips))

tourism_forecast <- tourism_hts |>
  model(arima_model = ARIMA(Trips)) |>
  reconcile(arima_td = top_down(arima_model)) |>
  forecast(h=20, bootstrap = TRUE)

tourism_forecast |> filter(.model == "arima_td")

执行后生成的Trips(dist类型)列仅为点估计,而非分布:

# A fable: 1,700 x 6 [1Q]
# Key:     State, Region, .model [85]
   State  Region   .model   Quarter    Trips .mean
   <chr*> <chr*>   <chr>      <qtr>   <dist> <dbl>
 1 ACT    Canberra arima_td 2018 Q1 666.0948  666.
 2 ACT    Canberra arima_td 2018 Q2 666.6314  677.
...(省略部分行)

相比之下,基础模型arima_model的Trips列是有效的采样分布:

tourism_forecast

# A fable: 3,400 x 6 [1Q]
# Key:     State, Region, .model [170]
   State  Region   .model      Quarter        Trips .mean
   <chr*> <chr*>   <chr>         <qtr>       <dist> <dbl>
 1 ACT    Canberra arima_model 2018 Q1 sample[5000]  661.
...(省略部分行)

请问fable是否应该为调和模型生成有效的预测区间,而非仅给出点估计?

附sessionInfo()信息:

sessionInfo()

R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.7.2
...(省略部分内容)

内容的提问来源于stack exchange,提问作者LauraDR

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 16:33:15