Evaluating MVA within Root Data Frame

Hi Enrico, Lorenzo,

thanks a lot for the pointers, it worked! I am using pyroot, it would probably good to have the examples, both in C++ and python, if possible. For the record, let me write below what I did, following the example suggested by Lorenzo (*)

Thanks again, Guillelmo

(*)

This is different w.r.t. C++ version

ROOT.gInterpreter.ProcessLine('''
TMVA::Experimental::RReader model("bdt_BDTG_vbfinc_v0.weights.xml");
computeModel = TMVA::Experimental::Compute<13, float>(model);
''')

This is just to make sure which variables we are using

variables = ROOT.model.GetVariableNames()
print(variables)

This is the actual application

.Define(“bdt_vbfinc”, ROOT.computeModel, ROOT.model.GetVariableNames())