I want to retrieve the classifier value of a trained BDT over a signal data set. To do this, I use pyROOT the following way:
reader = ROOT.TMVA.Reader( “!Color:!Silent” )
cosTheta = array.array(‘f’,)
… # add other variables
for i in range(len(events)):
cosTheta = np.cos(Theta[i])
… # fill other variables
bdtOutput = reader.EvaluateMVA(“BDT method”)
This works fine in the sense that it returns a value for the BDT classifier, but the histogram that I then get looks nothing like what was produced when making the xml file (i.e. in the TMVA GUI). I produced the xml file by running tutorials/tmva/TMVAClassification.C, using half the signal sample to train, the other half to test. I am now trying to get the BDT output for all events in this very same signal sample. I was expecting the result to look exactly the same but it’s completely different, in particular it’s not a smooth distribution: it has several peaks.
Thank you for the help!
ROOT Version: 6.24/00
Built for linuxx8664gcc on May 21 2021, 23:47:00