powered by
Undersample a dataset by expectation-maximization clustering
undersample_mclust(data, cls, cls_col, m, ...)
The undersampled dataframe containing only instance of cls.
cls
Data to be undersampled.
Class to be undersampled.
Class column.
Number of samples in undersampled dataset.
Additional arguments passed to Mclust()
Mclust()
setosa <- iris[iris$Species == "setosa", ] nrow(setosa) undersamp <- undersample_mclust(setosa, "setosa", "Species", 15) nrow(undersamp)
Run the code above in your browser using DataLab