本文介绍了R中CARET包中的createTimeSlices函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在处理多变量金融时间序列数据,但在使用 createTimeSlices
函数时遇到了问题.除了 Max Kuhn 使用的功能外,我找不到该功能的任何用途.谁能帮我理解这个函数的用法?
I am working with multivariate financial time series data and having problems using the createTimeSlices
function. I cannot find any use of the function except the one used by Max Kuhn. Can anybody help me in understanding the usage of the function?
推荐答案
文档正在对此功能进行改进"(换句话说,它目前很烂).另一个人最近就此事与我联系,这里是示例:
The documentation is being "improved" on this feature (in other words, it currently sucks). Another person contacted me recently about this and here is the example:
library(caret)
library(ggplot2)
data(economics)
myTimeControl <- trainControl(method = "timeslice",
initialWindow = 36,
horizon = 12,
fixedWindow = TRUE)
plsFitTime <- train(unemploy ~ pce + pop + psavert,
data = economics,
method = "pls",
preProc = c("center", "scale"),
trControl = myTimeControl)
最大
这篇关于R中CARET包中的createTimeSlices函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!