R 中 CARET 包中的 createTimeSlices 函数 [英] createTimeSlices function in CARET package in R

查看:49
本文介绍了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 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆