# Global weights in AddRegressionTree

**URL:** <https://root-forum.cern.ch/t/global-weights-in-addregressiontree/43212>\
**Category:** TMVA\
**Created:** [January 22, 2021, 11:57am UTC](https://root-forum.cern.ch/t/global-weights-in-addregressiontree/43212 "2021-01-22T11:57:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![testa](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/958977/32.png) [@testa](https://root-forum.cern.ch/u/testa)\
**Post date:** [January 22, 2021, 11:57am UTC](https://root-forum.cern.ch/t/global-weights-in-addregressiontree/43212/1 "2021-01-22T11:57:03Z")

</div>

Dear experts,  
I’ve two trees for a regression problem, corresponding to two different channels.  
For the training, I want that one channel has a larger weight.  
I tried putting two different weights in  
factory-\>AddRegressionTree( regTree, regWeight )  
factory-\>AddRegressionTree( regTree2, regWeight2 )  
but nothing changed.with respect to using the same weight for the two trees.

Best, Marianna.

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [January 22, 2021, 5:23pm UTC](https://root-forum.cern.ch/t/global-weights-in-addregressiontree/43212/2 "2021-01-22T17:23:35Z")

</div>

Hi Marianna,

The default normalisation for the dataloader is `EqualNumEvents` which ensures that each class is normalised independently to have an average event weight of 1.

To retain the per-class weighting, use `None`, or `NumEvents` where the former does no normalisation and the latter normalises _all_ events to an average weight of 1.

An additional note that does not apply to you since you are using regression but that is relevant for the common case of binary classification with boosted decision trees is that the events are then by default normalised according to `EqualNumEvents` (done internally in the method) unless `SkipNormalisation` is given as an option when booking the method. Again this last paragraph is not directly applicable to your situation but could be surprising if one is not aware 🙂

Cheers,  
Kim
