Description Usage Arguments Value
View source: R/model_building.R
This function samples the rows of a data.frame with balanced classes.
Useful when original training set has severely unbalanced classes.
1 | BalancedSample(df, sample_size = 5000, class_col = class_col)
|
df |
An object of class |
sample_size |
Numeric. Size of the sample from each class. |
class_col |
A character vector with the name of the column that identify the classes. |
Returns a data.frame with n=sample_size rows per class
randomly sampled.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.