Learn R Programming

themis (version 1.0.0)

tomek: Remove Tomek's links

Description

Removed observations that are part of tomek links.

Usage

tomek(df, var)

Value

A data.frame or tibble, depending on type of df.

Arguments

df

data.frame or tibble. Must have 1 factor variable and remaining numeric variables.

var

Character, name of variable containing factor variable.

Details

All columns used in this function must be numeric with no missing data.

References

Tomek. Two modifications of cnn. IEEE Trans. Syst. Man Cybern., 6:769-772, 1976.

See Also

step_tomek() for step function of this method

Other Direct Implementations: adasyn(), bsmote(), nearmiss(), smotenc(), smote()

Examples

Run this code
circle_numeric <- circle_example[, c("x", "y", "class")]

res <- tomek(circle_numeric, var = "class")

Run the code above in your browser using DataLab