Testing a BDT on a mixed sig/bg tree


For the purpose of training the BDT, I must have a TreeS and a TreeB.
However, after training my BDT, I would now like to test its abilities on some “real data”, which means that the data is not separated to signal and background, but rather they are mixed together (on lets say, treeData).
What method should I call in order to do so?

Also, when given only TreeS and TreeB, I presume that in the testing phase, the testing is being done on the sum of the variables of the two trees, right?

Thank you.


You could for example use SetInputTrees. In ROOT 6 this is found in the dataloader: https://root.cern.ch/doc/master/classTMVA_1_1DataLoader.html#ae3925a04a28575f355d5f754716cc7c8

In ROOT 5 it is found in the factory https://root.cern.ch/root/html534/TMVA__Factory.html#TMVA__Factory:SetInputTrees@1

If you specify nothing else in your call to PrepareTrainingAndTestTree() TMVA will split your data into two equal size parts, 50% of the data (both signal and background) will be used to train your BDT. After training, the BDT will be evaluated on the other 50% of the data.