bal_subsampling {daltoolboxdp} | R Documentation |
Subsampling
Description
Subsampling balances the class distribution of a dataset by reducing the representation of the majority class in the dataset.
Usage
bal_subsampling(attribute)
Arguments
attribute |
The class attribute to target balancing using subsampling |
Value
A bal_subsampling
object.
Examples
data(iris)
mod_iris <- iris[c(1:50,51:71,101:111),]
bal <- bal_subsampling('Species')
bal <- daltoolbox::fit(bal, mod_iris)
adjust_iris <- daltoolbox::transform(bal, mod_iris)
table(adjust_iris$Species)
[Package daltoolboxdp version 1.0.767 Index]