Description Usage Arguments Value
Given a data frame, split it as either (1) K equal slices for use in K-fold cross validation or (2) into a train-test split. If split into a training and testing set, you may select the training size as either a fraction of the original data, or by the number of observations.
1 2 |
dat |
Either a data frame or matrix to be split. |
method |
Either |
K |
The number of folds, if |
train_frac |
The fraction of data to be put into the training set. |
train_n |
The number of observations to be put into the trianing set,
if |
A list of data frames sliced from the original data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.