createTimeSlices function in CARET package in R

后端 未结 1 469
后悔当初
后悔当初 2020-12-30 06:28

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

相关标签:
1条回答
  • 2020-12-30 06:50

    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

    0 讨论(0)
提交回复
热议问题