View source: R/RandomForest_Functions.R
split.ratio | R Documentation |
## S3 method for class 'ratio'
split(df, nsets = 10, train.ratio = 0.8, rf.type, vpred)
df |
Input dataset as dataframe. |
nsets |
Number of random sets to generate, Default: 10 |
train.ratio |
Proportion of sample assigned to training set. Range from 0 to 1. E.g 0.8 indicates 80 \itemrf.typeOne of: vpredName of response variable. Required if rf.type = class. |
Outputs nsets*2 number of dataframes. Training sets are labeled train.i and Hold-out/Test sets are labeled hold.i where i ranges from 1 to nsets. Randomly split dataset by some ratio (e.g 80 train:20 test). Repeat several time for n number of sets. Default is 80:20. Written primarily for rf wrapper function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.