Description Usage Arguments Value Examples
Undersample a dataset by kmeans clustering.
1 | undersample_kmeans(data, cls, cls_col, m, k = 5)
|
data |
Dataset to be undersampled. |
cls |
Class to be undersampled. |
cls_col |
Column containing class information. |
m |
Number of samples in undersampled dataset. |
k |
Number of centers in clustering. |
The undersampled dataframe containing only instances of cls
.
1 2 3 | table(iris$Species)
undersamp <- undersample_kmeans(iris, "setosa", "Species", 15)
nrow(undersamp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.