Oversampling wrapper
oversample(dataset, method, class_attr = "Class", ...)
dataset | we want to perform oversampling on |
---|---|
method | selected method of oversampling |
class_attr |
|
... | Further arguments for |
An oversampled dataset
library("smartdata") data(iris0, package = "imbalance") super_iris <- oversample(iris0, method = "MWMOTE", class_attr = "Class", ratio = 0.8, filtering = TRUE)#> [1] "0 samples filtered by NEATER"super_iris <- oversample(iris0, method = "SMOTE", class_attr = "Class", ratio = 0.6) super_iris <- oversample(iris0, method = "PDFOS", class_attr = "Class", ratio = 0.6) super_iris <- oversample(iris0, method = "RWO", class_attr = "Class", ratio = 0.8) super_iris <- oversample(iris0, method = "SLMOTE", class_attr = "Class")#> [1] "SLS done"