# Looking for an algorithm that correctly clusters visually separable clusters

I have visualized a dataset in 2D after employing PCA. As 2D visualization shows in figure, there is a good separation between points (A, B). Now, I want to use a metric which can separate these points (between these 2 PC components not in main dataset) too. I mean have separation between these PCA components without visualization. I used some clustering methods but they raise false positives. I mean they miss cluster many points.

Also, as shown in histogram there is a gap between points A,B. Does this help in devising any metric?

I will be so grateful if you can introduce me any method and algorithm to be able to do separation between A and B.

• Hi, if my answer clarified your understanding of classification methods, may I ask you to upvote my answer? :) May 18, 2017 at 3:42

If you just want an algorithm to "confirm" your desired outcome then you are using it wrong. Be honest: if you want your result to be "if $F-factor-1 > 1.5 then cluster1 else cluster2", then just say so, instead of attempting to find a clustering algorithm to fit to your desired solution! • Thank you. No, this is not my only figure. I have many figures like this and visualization will take so much space in my work. Therefore, I need a good algorithm to work as visualization. Yes, DBSCAN with Epsilon=0.05 works well but single linkage is so poor in this issue. What is the point in selecting Epsilon? Btw, Do you know any open source tool that has OPTICS ? Jul 29, 2016 at 22:01 • OPTICS works well for me. I use the ELKI version, which is the only feature-complete version I know. It's open source. Jul 29, 2016 at 22:57 This picture from scikit-learn may help you get insight what methods would yield good result in your case, and what wouldn't, and why. Using k-means clustering algorithm on this dataset should work perfectly fine. You just have to pass the (n_samples, 2) matrix where element$(i,j)\$ represents the j-th coordinate of sample i in the PCA to any k-means algorithm, and specify that you want 2 clusters, and Euclidean metric.