| resample_imbalanced | R Documentation |
resample_imbalanced resamples an imbalanced data set to get a balanced data set.
resample_imbalanced(
dataset,
x,
y,
n = 1L,
k = 1L,
type = c("oversampling", "undersampling", "smote")
)
dataset |
An imbalanced data set, usually a data frame. |
x |
The names or indices of the feature columns within |
y |
The names or indices of the target columns with class labels (categories) within |
n |
The number of newly created samples or the percentage of deleted samples. |
k |
The number of nearest neighbors, only relevant for type |
type |
The technique to be used for creating a balanced data set. |
A balanced data set.
Chawla, Nitesh V., Bowyer, Kevin W., Hall, Lawrence O., Kegelmeyer, W. Philip (2002): SMOTE: Synthetic Minority Over-sampling Technique. In: Journal of Artificial Intelligence Research, 16 (2002), 321-357. https://doi.org/10.1613/jair.953; https://www.cs.cmu.edu/afs/cs/project/jair/pub/volume16/chawla02a-html/chawla2002.html, http://rikunert.com/SMOTE_explained.
Other Dummifying:
append_rows(),
dummify(),
dummify_multilabel(),
effectcoding(),
one_hot_decode(),
one_hot_encode(),
remove_columns(),
sparse_encode()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.