View source: R/data_splitting.R
Create n data partitions for training with equal sized classes via resampling.
1 2 | create_partitions(df, dep_var, level = NULL, n = 100L, major_class_wt = 1,
seed = 379L, test_pct = 0.33, binomial = TRUE)
|
df |
A |
dep_var |
A character string denoting the dependent variable in |
level |
level of interest. If |
n |
An integer denoting the number of ensembles to build. Defaults to |
major_class_wt |
Controls the number of major class cases selected in each
partition as a multiple of the number of minority class observations. Defaults to |
seed |
An integer. Seed for reproducibility. Defaults to |
test_pct |
A number in (0,1) specifying the size of the test dataset as a percentage.
Defaults to |
binomial |
Logical. Does the response variable follow a Binomial distribution? Defaults
to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.