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?
Caret is a one-stop solution for machine learning in R. The R package caret has a powerful train function that allows you to fit over 230 different models using one syntax. There are over 230 models included in the package including various tree-based models, neural nets, deep learning and much more.
The caret package (short for Classification And REgression Training) contains functions to streamline the model training process for complex regression and classification problems.
The function createDataPartition can be used to create balanced splits of the data. If the y argument to this function is a factor, the random sampling occurs within each class and should preserve the overall class distribution of the data.
Caret is short for Classification And REgression Training. It integrates all activities related to model development in a streamlined workflow. For nearly every major ML algorithm available in R.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With