BBNR: Blame Based Noise Reduction

Description Usage Arguments Details Value References Examples

View source: R/BBNR.R

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'
BBNR(formula, data, ...)

## Default S3 method:
BBNR(x, k = 3, 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

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

BBNR removes an instance 'X' if: (i) it participates in the misclassification of other instance (i.e. 'X' is among the k nearest neighbors of a misclassified instance and has a different class); and (ii) its removal does not produce a misclassification in instances that, initially, were correctly classified by 'X' (i.e. 'X' was initially among the k nearest neighbors and had the same class).

Value

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

References

Delany S. J., Cunningham P. (2004): An analysis of case-base editing in a spam filtering system. In Advances in Case-Based Reasoning (pp. 128-141). Springer Berlin Heidelberg.

Examples

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

## End(Not run)

NoiseFiltersR documentation built on May 29, 2017, 3:12 p.m.