remove.outliers {odetector} | R Documentation |
Remove outliers
Description
Removes the detected outliers from a data set.
Usage
remove.outliers(x, ot=1, sc=FALSE)
Arguments
x |
an object of |
ot |
an integer specifying the outlier detection approach. The default is 1 for the Approach 1. For the other methods use 2 or 3. See |
sc |
a logical value for including the objects in the small clusters into removal process. The default is FALSE. Use TRUE for removing the objects in the small clusters. |
Value
Xr |
a numeric matrix containing the outliers-removed data set. |
Author(s)
Zeynel Cebeci, Cagatay Cebeci, Yalcin Tahtali
See Also
detect.outliers
,
pairs.outliers
,
plot.outliers
,
print.outliers
,
summary.outliers
Examples
# Load the dataset x3p4c and extract the first three columns to x
data(x3p4c)
x <- x3p4c[,1:3]
# For 4 clusters, run Unsupervised Possibilistic Fuzzy C-Means (UPFC) algorithm
# of the package ppclust
res.upfc <- ppclust::upfc(x, centers=4)
# Detect the outliers
out <- detect.outliers(res.upfc)
# Remove the outliers
Xr1 <- remove.outliers(out, ot=1)
print(Xr1)
# Remove the outliers including the collective outliers
Xr2 <- remove.outliers(out, ot=1, sc=TRUE)
print(Xr2)
[Package odetector version 1.0.1 Index]