2D area clustering or DBSCAN analysis

_ROOT Version: 6.30
_Platform: Windows

Hey guys,

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:

[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { __orc_init_func.cling-module-8 }) }
cling JIT session error: Failed to materialize symbols: { (main, { ?read_data_v5@@YAXXZ }) }

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.

Thanks in advance.


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 ?


1 Like

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.

Thanks again.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.