# 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)
Run the code above in your browser using DataLab