TMVAGui binning 1D

Dear experts,
I would like to increase the binning of option 4b (Classifier Output Distributions…) I find in the TMVAGui.
I tried something that won’t work in the interactive session; e.g.:

root [0] TMVA::TMVAGui(“file.root”)
root [1] (TMVA::gConfig().GetVariablePlotting()).fNbins1D = 200;
–> press button in “Gui”

Is there a way to get this working? or do I have to add this to the script that is getting called by the TMVAGui?
If the second one is the case: I can’t find any macro in “$ROOTSYS/tmva” on a lxplus.

Thanks for your help!


The plots are generated during training itself, changing the binning would require you to specify that option and rerunning the training script. It is currently not possible to regenerate the output binning from the GUI only.

If you wish, you can manually construct the histogram by using a variation of the following (code adapted to be run as an interactive session, modify accordingly for a runnable script).

root -l /path/to/TMVAOutput.root
root [1] dataset->cd();
root [2] TestTree->Draw("BDTG>>hbkg(200, -1, 1)", "className==\"Background\"");
root [3] TestTree->Draw("BDTG>>hsig(200, -1, 1)", "className==\"Signal\"");
root [4] hsig->SetFillColorAlpha(kRed, 0.35);
root [5] hbkg->SetFillColorAlpha(kBlue, 0.35);
root [6] hbkg->SetTitle("Classifier output distribuition for Method BDTG");
root [7] hbkg->Draw(); hsig->Draw("SAME");


Hi Kim,
thanks for your reply! I have tried setting the option in my training script before creation of the “Factory”. The Gui still uses some default binning of 40. My guess is, that it got overwritten at some point. Maybe you know if there is a specific location to set this option, before I’ll try forever?
Of course I’ll try to create the plots by my own like you suggested. However there are a view more options settable and it would be a charm to get this working in my copy.


Try adding TMVA::gConfig().GetVariablePlotting().fNbinsMVAoutput = 200 to the top of your training script instead. :slight_smile: