I have several datasets that would come in TH2D histograms, in these data sets there’s are several separated areas that I would like to analyse each one separately. If I was working with Python, I would have used a DBSCAN in order to separate them and have the clustering I want. I do have a clustering code in C++, but when I run it with root, I get the following message:
Do you have any idea what I could use to have the clustering I want, I found a class called TH1K that would provide the nearest K Neighbours method but it only works in 1D, there’s no TH2K.
In ROOT we don’t have really clustering code. There is a K nearest neighbours code in TMVA but is used for classification problems, see section 8.5 of the TMVA Users guide.
If you have C++ code you should be able to use from ROOT. The error you are having looks like a linking error. How did you integrate your code with ROOT ?
Thanks for your response I was able to solve the problem using the TCutG class and doing the clustering “manually”. However, I’m still looking to automatise the whole thing so I could run for multiple data files at the same time.
As for the error, the code is working when I compile it with CMD using:
g++ main.cpp -o output
Then I would get the output.exe with the correct result. I don’t know how to integrate my code with ROOT. Should I start using different set of classes ? Any link or advice is much appreciated.