Dynamic Classification Filter

Share:

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

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

## Default S3 method:
dynamicCF(x, nfolds = 10, consensus = FALSE, m = 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.

nfolds

Number of folds for the cross voting scheme.

consensus

If set to TRUE, consensus voting scheme is applied. Otherwise (default), majority scheme is used.

m

Number of classifiers to make up the ensemble. It must range between 1 and 9.

classColumn

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

Details

dynamicCF (Garcia et al., 2012) follows the same approach as EF, but the ensemble of classifiers is not fixed beforehand. Namely, dynamicCF trains 9 well-known classifiers in the dataset to be filtered, and selects for the ensemble those with the m best predictions. Then, a nfolds-folds cross voting scheme is applied, with consensus or majority strategies depending on parameter consensus.

The nine (standard) classifiers handled by dynamicCF are SVM, 3-KNN, 5-KNN, 9-KNN, CART, C4.5, Random Forest, Naive Bayes and Multilayer Perceptron Neural Network.

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.

References

Garcia L. P. F., Lorena A. C., Carvalho A. C. (2012, October): A study on class noise detection and elimination. In Brazilian Symposium on Neural Networks (SBRN), pp. 13-18, IEEE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Next example is not run in order to save time
## Not run: 
data(iris)
trainData <- iris[c(1:20,51:70,101:120),]
# We fix a seed since there exists a random partition for the ensemble
set.seed(1)
out <- dynamicCF(Species~Petal.Length + Sepal.Length, data = trainData, nfolds = 5, m = 3)
summary(out, explicit = TRUE)
identical(out$cleanData, trainData[setdiff(1:nrow(trainData),out$remIdx),])

## End(Not run)