DBSCAN after PCA(Principal Component Analysis)

I was trying to apply DBSCAN on a 26x18 data.
Since the number of data is large, PCA was first applied to reduce the dimension.
And then DBSCAN was applied.
As a result, only one cluster was derived except for some noises.
Is there anybody to let me know where is wrong in my r code?


subfahp_x <- subfahp[,-1]


pca_subfahp_x = prcomp(subfahp_x, center = TRUE, scale = TRUE)
subfahp_x_transform = as.data.frame(-pca_subfahp_x$x[,1:8])

Obtaining optimal eps value

kNNdistplot(subfahp_x_transform, k=4)
abline(h=3, lty=2)

DBSCAN & Visualization

DBSCAN_subfahp <- dbscan(subfahp_x_transform, eps = 3, MinPts = 4)
fviz_cluster(DBSCAN_subfahp, subfahp_x_transform, ellipse = FALSE, geom = "point", show.clust.cent = FALSE)

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.