# Avoiding re-use of trained events during TMVA application

**URL:** <https://root-forum.cern.ch/t/avoiding-re-use-of-trained-events-during-tmva-application/15109>\
**Category:** TMVA\
**Created:** [October 18, 2012, 7:03pm UTC](https://root-forum.cern.ch/t/avoiding-re-use-of-trained-events-during-tmva-application/15109 "2012-10-18T19:03:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![callampen](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/callampen/32/11155_2.png) [@callampen](https://root-forum.cern.ch/u/callampen)\
**Post date:** [October 18, 2012, 7:03pm UTC](https://root-forum.cern.ch/t/avoiding-re-use-of-trained-events-during-tmva-application/15109/1 "2012-10-18T19:03:58Z")

</div>

It is my understanding that when applying a TMVA method (using TMVA::Reader) in your larger analysis (limit setting, etc), you don’t want to re-use your training events. However, I see no easy way to determine which events were used for training. I realize you could use the TestTree, but having all backgrounds and signal in one tree is a rather inflexible situation.

I’ve written a python script to compare TrainTree to my original input Trees, and adding branches to them lableing the training events. This seems rather ad-hoc, however. Am I missing some feature of TMVA that would handle this for me?

Or is this not nessecary? Is it expected that I can use both the training and testing data in the larger analysis? I assume in this case, you’d have to be very careful about overtraining.

Thank you.
