I have a set of data that are arranged along an index, with y values that sometimes exceed a threshold. I am interested in finding clusters of data along the index automatically. In the example below, the green dots are data points (original data set) while the red rasters are points which exceed the threshold (the data I'm actually interested in clustering).
It's quite easy to see by eye that there are three clusters, but I have a lot more data than this and am interested in automatically detecting clusters. I'm not super familiar with clustering methods, so I want to make sure I am using the correct method for the data- binomial (0 = below threshold, 1 = above threshold) along an index. Thanks!
PS I already tried smoothing the (green) data points with a loess curve and looking for local maxima, but the data is noisy enough that it did not perform well. I figured it would be easier to convert it to binomial data, not to lose any points that were above the threshold.