undersample_mclust | R Documentation |
Undersample a dataset by expectation-maximization clustering
undersample_mclust(data, cls, cls_col, m, ...)
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 |
The undersampled dataframe containing only instance of cls
.
setosa <- iris[iris$Species == "setosa", ]
nrow(setosa)
undersamp <- undersample_mclust(setosa, "setosa", "Species", 15)
nrow(undersamp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.