TMVA: the same samples, but very different results from traintest and apply phase using BDT or MLP

YiMVA.zip (2.9 MB)
Dear all,

I trained a BDT model,
but when i used the weight file to apply for the same samples (used for train & test),
the results are very different.

Could you help me with the situation?
(please see the following figures, and the code and samples are also attached, thanks)


Hi @yi.yu,

I am inviting @moneta to this topic as the relevant expert in TMVA. Unfortunately, I think he is off for a few days and might take a while to reply.

Cheers,
J.

Hi @jalopezg and @moneta,

I find the TMVA User Guide wrote that only int and float are supported in the applying phase.
so i try to change the double-branch to float-branch, such as “beta”, and comment the int-variables,
the applying results get normal.

but when i try to use the int-variable, like “pixelHit”, the applying results get abnormal again, and the red errors appear as the following. (now i have change all type to float, and it runs smoothly)

hence, i wanna to know if the TMVA only supports the Float type, and what the meaning of the errors?

thanks,
Yi

Hi @yi.yu,

Yes, according to the TMVA guide, it supports integer and floating-point types.

I think that the problem is that you have to specify the type to be I (for integer) in your TMVA::DataLoader::AddVariable() calls (in files trainNew.py and addNew.py). See the doxygen documentation here: ROOT: TMVA::DataLoader Class Reference. Note that, if unspecified by the user, it defaults to F (float).

Cheers,
J.