Question about error when using TMVA

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,

I guess @moneta can help you.

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