Learn R Programming

NoiseFiltersR (version 0.1.0)

PRISM: PReprocessing Instances that Should be Misclassified

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

"PRISM"(formula, data, ...)
"PRISM"(x, 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.
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

PRISM identifies ISMs (Instances that Should be Misclassified) and removes them from the dataset. In order to do so, it combines five heuristics based on varied approaches by means of a formula. One heuristic relies on class distribution among nearest neighbors, two heuristics are based on the class distribution in a leaf node of a C4.5 tree (either pruned or unpruned), and the other two are based on the class likelihood for an instance, assuming gaussian distribution for continuous variables when necessary.

References

Smith M. R., Martinez T. (2011, July): Improving classification accuracy by identifying and removing instances that should be misclassified. In Neural Networks (IJCNN), The 2011 International Joint Conference on (pp. 2690-2697). IEEE.

Examples

Run this code
data(iris)
out <- PRISM(Species~., data = iris)
print(out)
identical(out$cleanData, iris[setdiff(1:nrow(iris),out$remIdx),])

Run the code above in your browser using DataLab