get_var_imp {caretForecast} | R Documentation |
Variable importance for forecasting model.
get_var_imp(object, plot = TRUE)
object |
A list class of ARml or forecast object derived from ARml |
plot |
Boolean, if TRUE, variable importance will be ploted. |
A list class of "varImp.train". See varImp
or a
"trellis" plot.
Resul Akay
train <- window(AirPassengers, end = c(1959, 12))
test <- window(AirPassengers, start = c(1960, 1))
ARml(train, caret_method = "lm", max_lag = 12, trend_method = "none",
pre_process = "center") -> fit
forecast(fit, h = length(test), level = c(80,95)) -> fc
autoplot(fc)+ autolayer(test)
accuracy(fc, test)
get_var_imp(fc, plot = TRUE)