undersample_mclust {scutr} | R Documentation |
Undersample a dataset by expectation-maximization clustering
Description
Undersample a dataset by expectation-maximization clustering
Usage
undersample_mclust(data, cls, cls_col, m, ...)
Arguments
data |
Data to be undersampled. |
cls |
Class to be undersampled. |
cls_col |
Class column. |
m |
Number of samples in undersampled dataset. |
... |
Additional arguments passed to |
Value
The undersampled dataframe containing only instance of cls
.
Examples
setosa <- iris[iris$Species == "setosa", ]
nrow(setosa)
undersamp <- undersample_mclust(setosa, "setosa", "Species", 15)
nrow(undersamp)
[Package scutr version 0.2.0 Index]