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