# Reweigh background events such that background distribution is identical to signal for BDT input variable

**URL:** <https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826>\
**Category:** TMVA\
**Created:** [November 8, 2017, 11:58am UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826 "2017-11-08T11:58:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco\_Risitano](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/f14d63/32.png) [@Francesco\_Risitano](https://root-forum.cern.ch/u/Francesco_Risitano)\
**Post date:** [November 8, 2017, 11:58am UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826/1 "2017-11-08T11:58:00Z")

</div>

Hi all,

I am currently developing a boosted decision tree classifier and some of the input variables I am using have a momentum dependence. I would like to provide momentum as an input variable but I am worried that if I do this then the BDT will capitalise on the difference of the signal and background momentum distributions to aid in classification and therefore ultimately result in a momentum bias. To avoid this I would like to reweight background events such that their combined momentum distribution matches that of signal. How exactly do I go about doing this?

All help appreciated,  
Francesco

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [November 8, 2017, 1:51pm UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826/2 "2017-11-08T13:51:18Z")

</div>

Could you be more explicit about which quantities are involved? Is there a way to use a transformed variable that eliminates the momentum dependence? For example, if you have something that looks like a gaussian and the mean is momentum dependent, but sigma is the same, just subtract the mean from your input variable.

---

<div class="post-metadata">

**Author:** ![Francesco\_Risitano](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/f14d63/32.png) [@Francesco\_Risitano](https://root-forum.cern.ch/u/Francesco_Risitano)\
**Post date:** [November 8, 2017, 2:26pm UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826/3 "2017-11-08T14:26:41Z")

</div>

Sure, the quantities I am concerned about are the following ATLAS b-tagging discriminants: IP2D, IP3D, RNNIP, JetFitter, SV1 and MV2c10rnn. They are themselves multivariate algorithms that are concerned with b-jet identification. As they are multivariate algorithms the momentum dependence is not clear and therefore I don’t think a transformation would be able to eliminate the dependence.

I would like to apply a similar approach to that described in this note on page 13:

> **[ATL-PHYS-PUB-2016-012.pdf](https://cds.cern.ch/record/2160731/files/ATL-PHYS-PUB-2016-012.pdf)**
>
> 826.60 KB

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [November 8, 2017, 4:18pm UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826/4 "2017-11-08T16:18:32Z")

</div>

I think you are referring to this passage in the text, right? (emphasis is mine)

> The training of the multivariate classifier is performed on jets from tt¯ events with b-jets (1 million) being considered as signal, and c- (0.5 million) and light-flavour jets (1 million) being considered as background. The performance is tested on an independent sample of 5 million tt¯ events. **The kinematic properties of the jets, namely pT and |η|, illustrated in Figure 9, are included in the training in order to take advantage of the correlations with the other input variables**. However, **to avoid differences in the kinematic distributions of signal and background (light-flavour jets) _being interpreted_ as discriminating by the training**, the signal jets are reweighted in pT and |η| to match the spectrum of the light-flavour background jets. **No kinematic reweighting is applied at the evaluation stage of the multivariate classifier.**

It seems to me that you should include the momentum (or just pT, as above), to aid in classification. However, when computing the efficiency, the reweighting is done to avoid interpreting a difference in distribution as a difference in training discrimination. That said, it is not clear how this reweigthing was done, so if you know who wrote the article, he/she would be the best person to ask, or at least someone from the experiment. I think this is a bit out of the scope for this forum (I would answer if I knew, but I’m not familiar with the analysis in the article).

---

<div class="post-metadata">

**Author:** ![Francesco\_Risitano](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/f14d63/32.png) [@Francesco\_Risitano](https://root-forum.cern.ch/u/Francesco_Risitano)\
**Post date:** [November 8, 2017, 4:41pm UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826/5 "2017-11-08T16:41:49Z")

</div>

Yes that’s the passage I was referring to. Having taken a better look at the TMVA user guide I believe TMVA has event-by-event weighting capabilities so in theory I should be able to capitalise on this to achieve my desired result. Thank you very much for the advice and taking the time to help me.

All the best,  
Francesco
