Description Usage Arguments Value Examples
splitData
will split the dataset into train and test set by given sampling fraction or quantity, then return a list.
1 |
df |
A dataframe to be splitted. |
size |
A numeric. Specifies the sampling fraction or quantity of train set. |
ifpercent |
Logical, indicating whether the sampling fraction or quantity to be specified. |
A list contains train and test set, and train set is the fisrt.
1 2 3 4 | data(CreditData)
splitresult <- splitData(CreditData, size = 0.7, ifpercent = TRUE)
train <- splitresult[[1]]
test <- splitresult[[2]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.