Split TrainTree and TestTree into Signal and Background Train/Test Trees?

I have successfully trained a classification NN, which uses all my input data as 80:20 for Train:Test that’s been randomly selected from my input TTree. Now I want to apply a selection cut based on the response of my classifier. I see the saved output root file using PrepareTrainingAndTestTree() has saved two TTrees for the events used during training and testing, and there’s a branch in both TTrees for the response of the classifier. However, I don’t know which events are signal and background from the original input as they’ve been mixed together in both TTrees. Is there a way to split the TTrees into signal and background Train/Test, so I can select specific certain signal/background events after my trained NN? Here is what I mean looking at the response plot using the TMVA:GUI. I’d like to select, say, the signal events from 0.7 to 0.9. Thank you!

I guess a better question is, how do I apply a selection cut based on the response of my classifier to my input events? Thank you.

Dear @abayyari ,

I believe @moneta should be able to help you here.

Cheers,
Vincenzo

Hello,
Sorry for the late reply. The output Tree’s that are obtained after training in TMVA contains a “classID” branch which you can use to select signal or background events (classID=0 for signal and =1 for background in case of binary classification).

Best regards

Lorenzo

1 Like