Home | News | Documentation | Download

Limiting range of input variables in Multiclass

ROOT version: 6.10/09
platform: LxPlus

Hi
I am trying to limit the range of a certain input variable so that it is not used when the value is outside of this range. I can’t add it as a cut on TCut because I dont read this variable from the trees. I have tried to use the “min” and “max” values on AddVariable as shown in: https://root.cern.ch/doc/v606/classTMVA_1_1Factory.html#a821f2ef76c6ac29eebc059b19ee1df67
Like this:
dataloader->AddVariable("jet1_qgl:=("+Jet1_qgl+">=0)*("+Jet1_qgl+"+1)-1", 'F', 0.0, 1.0);
However this doesnt have any effect, and the variable has several values of (-1), outside of the (0,1) range.
Am I doing something wrong? Is there a different way of achieving this?
Thanks in advance

If I remember correctly, you have to load the variable yourself, as cuts only work during the training phase.

I invite @moneta, @kialbert or @sitong to confirm.

Hi,

Is it possbile to use

dataloader->AddVariable("jet1_qgl:=(Jet1_qgl>=0)*(Jet1_qgl+1)-1");

TString cut = "((Jet1_qgl>=0)*(Jet1_qgl+1)-1)>0 && ((Jet1_qgl>=0)*(Jet1_qgl+1)-1)<1";
dataloader->PrepareTrainingAndTestSet(cut, ...);

?

Cheers,
Kim