Home | News | Documentation | Download

TMVA: How do Tree and Event-By-Event Weights Work?

Hi TMVA-Experts,

I’m using the MLP Artificial Neural Network option in TMVA from ROOT version 6.02/13. I’m fairly new to TMVA. I have some specific questions but the over-arching issue I’m dealing with is a lack of understanding about how the Tree and Event-By-Event weights work. I’ve been reading the User’s Guide and looking online, but I haven’t found a satisfactory explanation of what the Tree or Event-By-Event weights do or how they are implemented. I have some guesses at how they might work (I’ve included my thinking below), but would really appreciate being pointed in the right direction.

From the User’s Guide I gather that the Tree weights are used to scale backgrounds to the same luminosity (pg 18). But I’m not sure exactly how TMVA implements these weights. My best intuitive guess is that the weights represent the relative proportions of different backgrounds that you want in the training and testing samples. For example, say you have 3 backgrounds (bkgA, bkgB, and bkgC) and you set

   bkgWeightA = 0.5/(size of bkgA Tree)    //Division by size of Tree in this case is to scale to the same luminosity
   bkgWeightB = 0.25/(size of bkgB Tree)
   bkgWeightC = 0.25/(size of bkgC Tree)

this would (once the Trees are added with the weights) produce a background sample 50% of which is bkgA events, 25% bkgB, and 25% bkgC. Is this interpretation correct? Or is there something I’m missing?

For the Event-By-Event weighting option (implemented by factory->SetWeightExpression(""), I’m less sure of exactly how this affects the background sample (if that is what these weights do). Is it something along the lines of a probability that a particular event is chosen when the sampling to build the Training and Testing samples is done?

The other option I could think of for how the weights (Event-By-Event and Tree) would be applied is to affect the re-weighting of the ANN’s weights (the weights between the nodes, I’ll call these connection weights for clarity) during training. For example, say bkgD is a fairly rare background (low weight), so you don’t want your ANN to over-specialize to identifying it, causing it to decrease its performance when seeing other, more prominent, backgrounds. So when the ANN sees a bkgD event and goes to update its connection weights the amount that the connection weights change would be scaled by the event and/or Tree weight so that the connection weights are not drastically altered, thus preventing over-specialization of the ANN to a rare background. Is this closer to how the weights actually work? If not, is there a way within TMVA to do this?

I appreciate, in advance, you taking the time to address these questions. If it exists, could you also point me to further documentation on this? Or tell me which .cxx files implement the weights?


Link to the answer in the TMVA users forum : https://sourceforge.net/p/tmva/mailman/message/35306050/

1 Like