# A confusion of weight

**URL:** <https://root-forum.cern.ch/t/a-confusion-of-weight/20784>\
**Category:** TMVA\
**Created:** [March 12, 2016, 3:10pm UTC](https://root-forum.cern.ch/t/a-confusion-of-weight/20784 "2016-03-12T15:10:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Li\_Huang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/848f3c/32.png) [@Li\_Huang](https://root-forum.cern.ch/u/Li_Huang)\
**Post date:** [March 12, 2016, 3:10pm UTC](https://root-forum.cern.ch/t/a-confusion-of-weight/20784/1 "2016-03-12T15:10:36Z")

</div>

Hi all,  
I have a confusion on the meaning of weight. For example, when I use BDT to distinguish signal and background, in real work , signal may 100 while background 10^6 . It is too little signal to avoid statistic error so I want to generate both signal and background 10^8 and use this data to analysis.

So that for signal , the weight should be 100/10^8 = 10^-6 and background’s 10^-2 . ? Am I right?

I want to know when the BDT in TMVA will use the weight , before training ? Or just use weight when test?

If I write my own BDT code , can I use , for example 10^8 signal and 10^8 background for training? And use some data to test , and I get the accuracy , and use weight when I need to calculate signal/sqart(Background)

I don’t know the use of weight in TMVA and other machine learning algorithm, can anyone help me?
