Classification application: unknown classifier in map

Dear TMVA users,

I’m having a bit of an issue with the TMVAClassificationApplication.C script.

After doing the training and testing with the TMVAClassification.C using the BDT method, I properly generate the .xml file. However, when calling root -l TMVAClassificationApplication.C\(\“BDT\”\) macro, I get the following error:

Processing TMVAClassificationApplication.C("BDT")...

==> Start TMVAClassificationApplication
                         : Booking "BDT BDT" of type "BDT" from dataset/weights/TMVAClassification_BDT.weights.xml.
<HEADER> DataSetInfo              : [Default] : Added class "Signal"
<HEADER> DataSetInfo              : [Default] : Added class "Background"
                         : Booked classifier "BDT" of type: "BDT"
--- TMVAClassificationApp    : Using input file: sps_background/sps_bg.root
--- Select signal sample
--- Processing: 17713 events
--- ... Processing event: 0
                         : <EvaluateMVA> unknown classifier in map; you looked for "BDT method" within available methods: 
                         :  --> BDT BDT
<FATAL>                          : Check calling string
***> abort program execution
terminate called after throwing an instance of 'std::runtime_error'
  what():  FATAL error

I looked into the TMVA source file found here (line 496) but couldn’t figure out what the problem is? Any idea?

Thank you in advance :slight_smile:


There is a bug in the example. Just substitute "BDT method" by simply "BDT" and it should work. I will fix the problem in the original file. Thanks for reporting!

1 Like

Actually, I just ran this tutorial and it didn’t show any errors. What version of ROOT are you using, and could you please attach the files you used to trigger this error, so that we can reproduce them and fix? Thank you.

Hi Amadio,

thank you for your anwer. It turns out that substituting “BDT method” by “BDT” does not work. I am using ROOT 6.12 and the tmva package included in it. I attached both weight file .xml and the macro .C.

Thank you for your help :slight_smile:


files.tar (185 KB)

Hi Kevin,

You have modified this line of your copy of TMVAClassificationApplication.C:

TString methodName = TString(it->first) + TString(" BDT");

This should be, as in the original,

TString methodName = TString(it->first) + TString(" method");

You select a method by passing the name as a parameter to the macro, not through modifying this part of the file.