ENN: The Edited Nearest Neighbours algorithm.

Description Usage Arguments Details Value References

Description

ENN removes the examples that are misclassified by their k nearest neighbours.

Usage

1
ENN(data, remove_class = "Majority", k = 3, classes = NULL)

Arguments

data

A data frame containing the predictors and the outcome. The predictors must be numeric and the outcome must be both a binary valued factor and the last column of data.

remove_class

Examples from remove_class are removed. The options are: c("Majority", "Minority", "Both").

k

Number of nearest neighbours to take into account.

classes

A named vector identifying the majority and the minority classes. The names must be "Majority" and "Minority". This argument is only useful if the function is called inside another sampling function.

Details

The default behaviour of ENN is to remove examples from the majority class that are misclassified by their k nearest neighbours, however, the user can modify this and select to remove only examples from the minority class or remove examples from both classes.

Value

A data frame containing a clean version of the input data set after application of the Edited Nearest Neighbours algorithm.

References

Wilson, D. L. (1972). Asymptotic properties of nearest neighbor rules using edited data. IEEE Transactions on Systems, Man, and Cybernetics, 2(3), 408-421.


RomeroBarata/bimba documentation built on May 17, 2019, 8:03 a.m.