machine-learning - 在 R 中使用插入符包进行时间序列预测

标签 machine-learning time-series r-caret

我正在尝试使用插入符包来预测经济数据。有什么方法可以预测 future 几年的值(value)吗?

library(mlbench)
library(caret)
library(pROC)
library(caTools)
library(ROCR)

myTimeControl <- trainControl(  method = "timeslice",  initialWindow = 36,
  horizon = 12,  fixedWindow = FALSE,  allowParallel = TRUE,  classProbs = TRUE,
  summaryFunction = twoClassSummary,  verboseIter = TRUE) 

modelRF <- train(
  as.factor(class) ~ . ,  data =  TestData,   method = "rf",  metric =  "ROC",
  ntree  = 1000,   preProc = c("center", "scale"),  trControl = myTimeControl)

请帮我预测 future 几年的类(class)。

最佳答案

您需要使用 predict 方法和 x 数据来预测您想要的结果。

关于machine-learning - 在 R 中使用插入符包进行时间序列预测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45128351/

相关文章:

python - 当验证损失满足某些标准时提前停止

tensorflow - 用于多标签分类的 keras 自定义指标

r - 使用插入符号查找最近的邻居

使用插入符号训练函数的 R 随机森林交叉验证不会产生与手动完成时相同的准确性

r - 无法在 R 中加载 'Caret'

machine-learning - 不同的机器学习分类器有不同的性能,我可以推断出什么?

machine-learning - 理解 scikit learn 中的岭线性回归

python - NARX PyNeurgen 库

r - 如何 "round"ggplot中的范围线

sql - 如何使用窗口滞后函数对具有多种传感器类型的数据进行分区