# Evaluating MVA within Root Data Frame

**URL:** <https://root-forum.cern.ch/t/evaluating-mva-within-root-data-frame/49238>\
**Category:** TMVA\
**Tags:** rdataframe\
**Created:** [March 17, 2022, 4:17pm UTC](https://root-forum.cern.ch/t/evaluating-mva-within-root-data-frame/49238 "2022-03-17T16:17:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ceballos](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ceballos/32/28525_2.png) [@ceballos](https://root-forum.cern.ch/u/ceballos)\
**Post date:** [March 18, 2022, 11:02am UTC](https://root-forum.cern.ch/t/evaluating-mva-within-root-data-frame/49238/4 "2022-03-18T11:02:30Z")

</div>

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())

---

_[View the full topic](https://root-forum.cern.ch/t/evaluating-mva-within-root-data-frame/49238)._
