I’ve tried to find some information, but I couldn’t find any actual example. I am trying to evaluate a BDT output within RDF (it could be BDT or anything). I’ve already made the training and I have the xml files. I have used TMVA, if this is important to mention.
Nevertheless, how can I evaluate the BDT output? It’s not clear to me how this could be done.
Hi @ceballos ,
basically you need a function or functor object that takes the column values as input and returns the classification output, let’s call it EvalBDT. Then you can use it as:
auto df_with_bdt_weight = df.Define("weight", EvalBDT, {"x", "y", "z"})
assuming x, y and z are your inference inputs.
TMVA has experimental interfaces to create such a functor object, probably @moneta can provide an example.
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 (*)
I have the same issue for evaluating the MVA weight within Root dataframe. My input variables are stored as vector instead of being float. In the normal root I can pass each element of vector as float within the event loop to evaluate the MVA weight but here as we dont have visible loop over events. Is there any example for that?