Description Usage Arguments Details Value Note References Examples
Ensembled-based filters that use C4.5 classifier to remove label noise from a dataset as a preprocessing step of classification. For more information, see 'Details' and 'References' sections.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## S3 method for class 'formula'
C45robustFilter(formula, data, ...)
## Default S3 method:
C45robustFilter(x, classColumn = ncol(x), ...)
## S3 method for class 'formula'
C45votingFilter(formula, data, ...)
## Default S3 method:
C45votingFilter(x, nfolds = 10, consensus = FALSE,
classColumn = ncol(x), ...)
## S3 method for class 'formula'
C45iteratedVotingFilter(formula, data, ...)
## Default S3 method:
C45iteratedVotingFilter(x, nfolds = 10, consensus = FALSE,
classColumn = ncol(x), ...)
|
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. |
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. |
Full description of the methods can be looked up in the provided reference. Notice that C4.5 is used as base classifier instead of TILDE, since a standard attribute-value classification framework is considered (instead of the ILP classification approach of the reference).
C45robustFilter
builds a C4.5 decision tree from the training data, and then
removes those instances misclassfied by this tree. The process is repeated until no instances are removed.
C45votingFilter
splits the dataset into nfolds
folds, building and testing a C4.5 tree on every
combination of nfolds
-1 folds. Thus nfolds
-1 votes are gathered
for each instance. Removal is carried out by majority or consensus voting schemes.
C45iteratedVotingFilter
somehow combines the two previous filter, since
it iterates C45votingFilter
until no more noisy instances are removed.
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.
By means of a message, the number of noisy instances removed is displayed in the console.
Verbaeten S. (2002, December): Identifying mislabeled training examples in ILP classification problems, in Proc. 12th Belgian-Dutch Conf. Mach. Learn., Utrecht, The Netherlands, pp. 71-78.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Next example is not run in order to save time
## Not run:
data(iris)
out1 <- C45robustFilter(Species~.-Sepal.Length, iris)
# We fix a seed since next two functions create partitions of data for the ensemble
set.seed(1)
out2 <- C45votingFilter(iris, consensus = TRUE)
out3 <- C45iteratedVotingFilter(Species~., iris, nfolds = 5)
print(out1)
print(out2)
print(out3)
identical(out1$cleanData,iris[setdiff(1:nrow(iris),out1$remIdx),])
identical(out2$cleanData,iris[setdiff(1:nrow(iris),out2$remIdx),])
identical(out3$cleanData,iris[setdiff(1:nrow(iris),out3$remIdx),])
## End(Not run)
|
Iteration 1: 3 instances removed
Iteration 2: 0 instances removed
Summary: 3 instances removed in 2 iterations
Iteration 1: 2 noisy instances removed
Iteration 2: 0 noisy instances removed
Summary: 2 instances removed in 2 iterations
Call:
C45robustFilter(formula = Species ~ . - Sepal.Length, data = iris)
Results:
Number of removed instances: 3 (2 %)
Number of repaired instances: 0 (0 %)
Call:
C45votingFilter(x = iris, consensus = TRUE)
Parameters:
nfolds: 10
consensus: TRUE
Results:
Number of removed instances: 1 (0.6666667 %)
Number of repaired instances: 0 (0 %)
Call:
C45iteratedVotingFilter(formula = Species ~ ., data = iris, nfolds = 5)
Parameters:
nfolds: 5
consensus: FALSE
Results:
Number of removed instances: 2 (1.333333 %)
Number of repaired instances: 0 (0 %)
[1] TRUE
[1] TRUE
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.