Problem TMVA with binary Inputs


I’m using TMVA in order to classify people who have or not a heart disease.

As inputs I have many variables such as age, heart rate, sex etc…
The problem is that if I introduce sex which is a binary variable (0,1) I get the next error:

The number of intances is the same for background and signal (120). Besides, if I replace le sex with another non binary variable but discontinous (chest pain [0 , 4]) it works fine.

Am I doing something wrong or TMVA doesn’t accept binary variables as inputs?

I have modified the TMVAClassification.C macro.

Thank you in advance.


Have you tries to input the binary variable as a float one , which can take only 0 or 1 values ?



No, I have tried with an Integer like this:

And sex variable gets 1 for a men and 0 for a woman.



Did you check how this variable is defined in your tree (if you are loading data through TTree)?


Apparently it’s ok. I’ve used le TBrowser and I obtain this for the background:

And If I use instead the variable painChest which can take (0,1,2,3) then it works fine.