How to automatically cluster a set of parallel curves?

I have an ensemble of datasets, each one containing one or more parallel curves in a 2-dimensional domain. Each curve is formed by individual 2-dimensional points:

What I want

I am trying to automatically cluster the curves to extract information such us what points belong to each curve and how many curves are there in the given dataset.

The only clustering algorithm that comes to my mind to perform this task is DBSCAN, which needs two parameters that must be tuned: the search radius and the number of neighbors. The number of neighbors is not a problem, but I need to compute the best radius in order to not mix up two different curves, while managing the little lack of data in some areas of a given curve.

After a hand-made tune, I came up with this clustering:

which is the desired solution.

What I tried

To automatically compute the best DBSCAN parameters, I am using the technique described here, where the Elbow Point of the Number of Neighbors vs Distance is automatically extracted. I expected that the values beyond the elbow point are those corresponding to the radii where the curves are mixing up in the same clusters, but that's not the reality. The results I am obtaining using the tecnique are as follows:

Question

So, my question is, is there a way to automatically tune the DBSCAN parameters to achieve the desired results? Are there any other clustering algorithm that fits better to this problem?

Topic dbscan clustering

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.