View source: R/mi_balance_data.R
mi_balance_data | R Documentation |
Data balance. Most classes adopt random undersampling, while a few classes adopt smote method to oversample to obtain relatively balanced data.
mi_balance_data(data, ratio = 0.3, parallel = FALSE)
data |
A data frame. Except for class column, all are numeric types. |
ratio |
Numeric between 0 and 1. The percent of the test set split from data. |
parallel |
Logical. |
A list contains a train set and a test set.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.