bal_oversampling {daltoolboxdp}R Documentation

Oversampling

Description

Oversampling balances the class distribution of a dataset by increasing the representation of the minority class in the dataset. It wraps the smotefamily library.

Usage

bal_oversampling(attribute)

Arguments

attribute

The class attribute to target balancing using oversampling.

Value

A bal_oversampling object.

Examples

data(iris)
mod_iris <- iris[c(1:50,51:71,101:111),]

bal <- bal_oversampling('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]