简体   繁体   English

R中的CARET包中的createTimeSlices函数

[英]createTimeSlices function in CARET package in R

I am working with multivariate financial time series data and having problems using the createTimeSlices function. 我正在处理多元金融时间序列数据,并且在使用createTimeSlices函数时遇到问题。 I cannot find any use of the function except the one used by Max Kuhn . 除了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)

Max 马克斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM