AENN: All-k Edited Nearest Neighbors

Description Usage Arguments Details Value References Examples

Description

Similarity-based filter for removing label noise from a dataset as a preprocessing step of classification. For more information, see 'Details' and 'References' sections.

Usage

1
2
3
4
5
## S3 method for class 'formula'
AENN(formula, data, ...)

## Default S3 method:
AENN(x, k = 5, classColumn = ncol(x), ...)

Arguments

formula

A formula describing the classification variable and the attributes to be used.

data, x

Data frame containing the tranining dataset to be filtered.

...

Optional parameters to be passed to other methods.

k

Total number of nearest neighbors to be used.

classColumn

Positive integer indicating the column which contains the (factor of) classes. By default, the last column is considered.

Details

AENN applies the Edited Nearest Neighbor algorithm ENN for all integers between 1 and k on the whole dataset. At the end, any instance considered noisy by some ENN is removed.

Value

An object of class filter, which is a list with seven components:

References

Tomek I. (1976, June): An Experiment with the Edited Nearest-Neighbor Rule, in Systems, Man and Cybernetics, IEEE Transactions on, vol.SMC-6, no.6, pp. 448-452.

Examples

1
2
3
4
5
6
7
8
# Next example is not run in order to save time
## Not run: 
data(iris)
out <- AENN(Species~.-Petal.Length,iris)
print(out)
identical(out$cleanData, iris[setdiff(1:nrow(iris),out$remIdx),])

## End(Not run)

Example output

Call:
AENN(formula = Species ~ . - Petal.Length, data = iris)

Parameters:
k: 5

Results:
Number of removed instances: 8 (5.333333 %)
Number of repaired instances: 0 (0 %)
[1] TRUE

NoiseFiltersR documentation built on May 2, 2019, 2:03 a.m.