Learn R Programming

NoiseFiltersR (version 0.1.0)

CVCF: Cross-Validated Committees Filter

Description

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

Usage

"CVCF"(formula, data, ...)
"CVCF"(x, nfolds = 10, consensus = FALSE, 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.
nfolds
number of folds in which the dataset is split.
consensus
logical. If TRUE, consensus voting scheme is used. If FALSE, majority voting scheme is applied.
classColumn
positive integer indicating the column which contains the (factor of) classes. By default, the last column is considered.

Value

An object of class filter, which is a list with seven components:
  • cleanData is a data frame containing the filtered dataset.
  • remIdx is a vector of integers indicating the indexes for removed instances (i.e. their row number with respect to the original data frame).
  • repIdx is a vector of integers indicating the indexes for repaired/relabelled instances (i.e. their row number with respect to the original data frame).
  • repLab is a factor containing the new labels for repaired instances.
  • parameters is a list containing the argument values.
  • call contains the original call to the filter.
  • extraInf is a character that includes additional interesting information not covered by previous items.

Details

Full description of the method can be looked up in the provided references. Dataset is split in nfolds folds, a base classifiers (C4.5 in this implementation) is built over every combination of nfolds-1 folds, and then tested on the whole dataset. Finally, consensus or majority voting scheme is applied to remove noisy instances.

References

Verbaeten S., Van Assche A. (2003, June): Ensemble methods for noise elimination in classification problems. Proc. 4th Int. Conf. Multiple Classifier Syst., Guildford, U.K., pp. 317-325.

Examples

Run this code
# Next example is not run in order to save time
## Not run: 
# data(iris)
# # We fix a seed since there exists a random partition for the ensemble
# set.seed(1)
# out <- CVCF(Species~.-Sepal.Width, data = iris)
# print(out)
# identical(out$cleanData, iris[setdiff(1:nrow(iris),out$remIdx),])
# ## End(Not run)

Run the code above in your browser using DataLab