# Question about error when using TMVA

**URL:** <https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319>\
**Category:** TMVA\
**Created:** [January 30, 2023, 10:08am UTC](https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319 "2023-01-30T10:08:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenChao](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/stephenchao/32/31509_2.png) [@StephenChao](https://root-forum.cern.ch/u/StephenChao)\
**Post date:** [January 30, 2023, 10:08am UTC](https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319/1 "2023-01-30T10:08:23Z")

</div>

Dear experts,

When I used the Fisher method in TMVA, I booked the method like this:  
` if (Use["Fisher"]) factory->BookMethod( dataloader, TMVA::Types::kFisher, "Fisher", "H:!V:Fisher:VarTransform=None:CreateMVAPdfs:PDFInterpolMVAPdf=Spline2:NbinsMVAPdf=50:NsmoothMVAPdf=10" );`

But I got the error : `<FATAL> : <GetSeparation> signal and background histograms have different or invalid dimensions:`

after the program showing `Preparing the Decorrelation transformation...`

There are also many WARNINGs like: `Variable "a_HWqqWqq0c" has zero, negative, or NaN RMS^2: -nan ==> set to zero. Please check the variable content `

I am really confused about this since sometimes the program can run successfully, but sometimes it got these errors when I changed the `TCut` inside the code.

Could you please give me some clues about the solution? Many thanks!

Best Regards,  
Yuzhe

---

<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 30, 2023, 3:00pm UTC](https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319/2 "2023-01-30T15:00:43Z")

</div>

I guess @moneta can help you.

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [January 31, 2023, 8:57am UTC](https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319/3 "2023-01-31T08:57:48Z")

</div>

Hi,  
The problem is likely caused by some issues with the input data. It is possible you have a NaN in your data or some variables have all the same values causing a standard deviation to be equal to zero. I would suggest first to check, looking at them in an histogram your input variables for both signal and background.  
If you have then still these issues, please share your code and data and I can have a look

Best

Lorenzo
