# Classification problem on modified macros

**URL:** <https://root-forum.cern.ch/t/classification-problem-on-modified-macros/30341>\
**Category:** TMVA\
**Created:** [August 21, 2018, 9:06am UTC](https://root-forum.cern.ch/t/classification-problem-on-modified-macros/30341 "2018-08-21T09:06:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hokyeong](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hokyeong/32/16928_2.png) [@Hokyeong](https://root-forum.cern.ch/u/Hokyeong)\
**Post date:** [August 21, 2018, 9:06am UTC](https://root-forum.cern.ch/t/classification-problem-on-modified-macros/30341/1 "2018-08-21T09:06:36Z")

</div>

Dear experts  
I am trying to modify TMVAClassification.C to test the SVM classification  
I made two different data files, one working by macros the other one is failed

I get the following error message

```auto
<FATAL> : <GetSeparation> signal and background histogram have different or invalid dimensions:
***> abort program execution
terminate called after throwing an instance of 'std::runtime_error'
what(): FATAL error

```

I can not find what the cause of the erorr is  
Could you please help me with this?

I attached the data files and modified macros of classification  
[gaussian\_data\_1.root](https://root-forum.cern.ch/uploads/default/original/3X/8/9/8914da42b6108e723b6fd6354a3c697c92bf34ed.root) (426.3 KB)  
[gaussian\_data\_2.root](https://root-forum.cern.ch/uploads/default/original/3X/3/3/3397b6c068ec5c41d82ff0ddc1caa1901dd9150c.root) (215.5 KB)  
[TMVAClassification.C](https://root-forum.cern.ch/uploads/default/original/3X/b/3/b331534eb9a8595b6b878f1c103e0365bbf46575.C) (2.2 KB)

gaussian\_data\_1 is working  
gaussian\_data\_2 does not work

Thank you a lot for your help in advance

best regards,  
Nam

---

<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:** [August 21, 2018, 12:45pm UTC](https://root-forum.cern.ch/t/classification-problem-on-modified-macros/30341/2 "2018-08-21T12:45:28Z")

</div>

Hi,

In situations like this you have help of the TMVA error messages. In your case the line  
`<WARNING> : Variable "var1" has zero, negative, or NaN RMS^2: nan ==> set to zero. Please check the variable content`  
indicates that something fishy is happening with the as it arrives to TMVA.

Inspecting the second data file with the command `rootbrowse` we can see that the weight variable in the background tree is 0 for all events. This means all events you add will effectively be (0, 0, 0) which is probably not what you want 😉

TLDR; Fix the data generation to weight background events correctly or remove line 52 in your script.

Cheers,  
Kim
