Hierarchical Time Series
问题 I used the hts package in R to fit an HTS model on train data, used "arima" option to forecast and computed the accuracy on the holdout/test data. Here is my code: library(hts) data<-read.csv("C:/TS.csv") ts_train <- ts(data[,-1],frequency=12, start=c(2000,1)) hts_train <- hts(ts_train, nodes=list(2, c(4, 2))) data.test<-read.csv("C:/TStest.csv") ts_test <- ts(data.test[,-1],frequency=12, start=c(2003,1)) hts_test <- hts(ts_test, nodes=list(2, c(4, 2))) forecast <- forecast(hts_train, h=15,