BDT.C macro in the TMVAGui Error in <TXMLEngine::ParseFile>: XML syntax error at line

Dear Experts,

I’m not able to visualise the BDT using the macro in the GUI due to this error:

Error in TXMLEngine::ParseFile: XML syntax error at line 91
test1— Found 0 decision trees in weight file
— Reading Tree 0 from weight file: /afs/cern.ch/work/g/gusai/public/UTA-MVA/weights/TMVAClassification_BDT.weights.xml
*** ERROR: requested decision tree: 0, but number of trained trees only: 0

Not sure if my weight file is correct or if this is a problem in the parser.
I’m using the TMVA as installed on root 6.06/06 on lxplus or on my mac with same results/errors.
I’m training a BDT with MC samples (weighted events, which include also some negative weights)

my setup, with the weights and output files is accessible here: /afs/cern.ch/work/g/gusai/public/UTA-MVA

This is the file I’m looking at:
TMVA::TMVAGui(“TMVA_Output_mc15_13TeV.387231.MGPy8EG_A14N23LO_TT_directTT_500_327_MET100.root_njets>=2&&nbjets>=1&&ptlep1>20000&&ptlep2>15000_file.root”);

Many thanks for any comment a/o advice.
Giulio

Hi,

I’m looking into this. In the mean while, I wonder if it’s the large pdf histogram that confuses the xml parser. Could you try try manually editing the xml-file to remove the everything inside the MVAPdfs tag? (If you do, remember to backup the original!)

Cheers,
Kim

1 Like

Hi,

I can confirm that if you manually remove the mentioned xml-tag from the weight file you can generate the BDT plot.

The problem, I think, is that the xml-file is too large for the parser to handle (a fix for this is to be integrated the development version of root).

To reduce the output file size, you can tune the size of the generated histogram using e.g. CreateMVAPdfs:NbinsMVAPdf=X in the options to your method. More information can be found in the TMVA User’s Guide Chapter 8 and Code Example 60.

Cheers,
Kim

1 Like

Hi,

It is a real problem in TXMLEngine class of ROOT. I already submit a fix for it: https://github.com/root-project/root/pull/2280. Seems to be, problem was existing since beginning, but appears only on very recent Linux distributions.

Regards,
Sergey

2 Likes

Dear Kim,

many thanks for looking into the issue. Reducing the Nbins solve this to me.

Thanks and cheers,
Giulio