Hi,
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?
library(factoextra)
library(dbscan)
subfahp_x <- subfahp[,-1]
PCA
pca_subfahp_x = prcomp(subfahp_x, center = TRUE, scale = TRUE)
summary(pca_subfahp_x)
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)