PReprocessing Instances that Should be Misclassified

Share:

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

## Default S3 method:
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.

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.

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

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

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