Interface of EvaluateMVA

Dear experts,

After searching a bit, I could not find similar post for this question. I would like to post my question here.

I am currently working on the TMVA applications. Consulting the example code TMVAClassificationApplication.C. It consists of several steps.

  1. AddVariable
  2. BookMVA
  3. EvaluateMVA

In this example code, the interface EvaluateMVA with input TString is used. However, I can find another interface EvaluateMVA making using of std::vector<double>. I am wondering whether I need to call AddVariable if I use the interface with std::vector. How could I properly use this interface?

Many thanks in advance.

Perhaps @moneta can give more information.

Hi,
It is correct you have another interface in the Reader for Evaluate the MVA, where you can pass an std::vector as input. But also in that case you need to call Reader::AddVariable in order to match the method with the saved one in the XML file.
We have however a new class to perform a simple evaluation which internally will set the variables for you. The class is TMVA::Experimental::RReader see ROOT: TMVA::Experimental::RReader Class Reference.

An example for using it is the tutorial ROOT: tutorials/tmva/tmva003_RReader.C File Reference

Lorenzo