
Z <- ahead::dynrmf(USAccDeaths, h=15, level=95, fit_func = fit_func,įorecasting using ahead::dynrmf and xgboost # xgboost -įit_func <- function(x, y. Predict(object=obj, data=newx)$predictions # only accepts a named newx

Z <- ahead::dynrmf(USAccDeaths, h=15, level=95)įorecasting using ahead::dynrmf and ranger # ranger -ĭf <- ame(y=y, x) # naming of columns is mandatory for `predict`Ĭolnames(newx) <- paste0("X", 1:ncol(newx)) # mandatory, linked to df in fit_func # default, with ridge regression's regularization parameter minimizing GCV Packages required for the demo library(ahead)įorecasting using ahead::dynrmf’s default parameters # ridge. Installing package ahead options(repos = c( The demo uses ahead::dynrmf in conjunction with R packages:Ĭaret: functions to streamline the model training process for complex regression problems. If you’re not familiar with package ahead yet, you should read the following posts first:Īutomatic Forecasting with ahead::dynrmf and Ridge regression (R version) The predict functions associated to randomForest::randomForest and e1071::svm do have a prototype like predict(object, newx) or predict(object, newdata), which are both well-understood input formats for ahead::dynrmf.Īfter reading this post, you’ll know how to adjust hundreds of different Statistical/Machine Learning (ML) models to univariate time series, and you’ll get a better understanding of how ahead::dynrmf works. The fitting function can handle matricial inputs (can be called as fitting_func(x, y), also said to have a x/y interface), and not only a formula input (can be called as fitting_func(y ~. Indeed, the examples presented in the package’s README work quite smoothly – for randomForest::randomForest and e1071::svm – because: Today, we examine some nontrivial use cases for ahead::dynrmfforecasting.
