# Problems with reproducibility of BDTscore

**URL:** <https://root-forum.cern.ch/t/problems-with-reproducibility-of-bdtscore/37706>\
**Category:** TMVA\
**Created:** [January 24, 2020, 7:08pm UTC](https://root-forum.cern.ch/t/problems-with-reproducibility-of-bdtscore/37706 "2020-01-24T19:08:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DVKrasnop](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@DVKrasnop](https://root-forum.cern.ch/u/DVKrasnop)\
**Post date:** [January 24, 2020, 7:08pm UTC](https://root-forum.cern.ch/t/problems-with-reproducibility-of-bdtscore/37706/1 "2020-01-24T19:08:32Z")

</div>

Dear ROOT supporting team,

I found a weird behaviour of TMVA in terms of reproducibility of BDTscore depending on how input parameters are set. I tried two ways of setting variables for reader:

1. hard coding before calling EvaluateMVA
2. reading from root file (follow instructions here [https://root.cern.ch/doc/v606/TMVAClassificationApplication\_8C\_source.html](https://root.cern.ch/doc/v606/TMVAClassificationApplication_8C_source.html))

Having exactly the same values for the input parameters and using same weights file, but depending on setting way I got slightly different values for the BDTscore. I do not think it is expected, even given the fact that on very large statistics BDTscore distributions would look very close.  
Could you please comment on this issue?

Code and input files are attached:[for\_test.zip](https://root-forum.cern.ch/uploads/short-url/y0mxiehajlmOXwYWPG7tKebexAF.zip) (788.9 KB) To test two different ways one can uncomment some lines.  
Thank you!

Best regards,  
Dimitrii.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 27, 2020, 10:03am UTC](https://root-forum.cern.ch/t/problems-with-reproducibility-of-bdtscore/37706/2 "2020-01-27T10:03:41Z")

</div>

May be @moneta can help you.

---

<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 27, 2020, 4:55pm UTC](https://root-forum.cern.ch/t/problems-with-reproducibility-of-bdtscore/37706/3 "2020-01-27T16:55:21Z")

</div>

Hi,

You must manually apply transformations of the input data, i.e. you are missing

```auto
// ...snip...
theTree->GetEntry(0);

dLepEta = fabs(lepplus_eta-lepminus_eta);
dLepPhi = fabs(lepplus_phi-lepminus_phi);
// ...snip...

```

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![DVKrasnop](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@DVKrasnop](https://root-forum.cern.ch/u/DVKrasnop)\
**Post date:** [January 27, 2020, 5:17pm UTC](https://root-forum.cern.ch/t/problems-with-reproducibility-of-bdtscore/37706/4 "2020-01-27T17:17:19Z")

</div>

Dear Kim,

yes it works, thank you! It seems I was on the right way by testing right now the option when one manually sets lepminus\_eta(phi) and lepplus\_eta(phi) for the first reading method, the next step was to try setting the transformation after taking variables from the tree in the second method.  
Thank you greatly again for quick answer!

Kind regards’  
Dimitrii
