# How to use TMVA methods in a older version of root

**URL:** <https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644>\
**Category:** TMVA\
**Created:** [October 23, 2017, 11:35am UTC](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644 "2017-10-23T11:35:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.bragagnolo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@a.bragagnolo](https://root-forum.cern.ch/u/a.bragagnolo)\
**Post date:** [October 23, 2017, 11:35am UTC](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644/1 "2017-10-23T11:35:33Z")

</div>

Hi,  
I’ll try to explain my problem the best I can.

I’m trying to use my TMVA trained methods, a BDT and a DNN (i.e. trying to use TMVA:Reader), in an enviroment (CMSSW) that use a different version of root (6.06/01) from the one on which I have trained my methods (6.10/06). This causes the following error:

> — BDT : The following options were specified, but could not be interpreted: ‘RegressionLossFunctionBDTG=huber:HuberQuantile=7.000000e-01:SkipNormalization=False’, please check!  
> \*\*\*\> abort program execution

First question: is there a simple workaround?

I tried (unsuccessfully) to link my libTMVA.so (new ver) in the software. After a couple of tries I think the compiler/linker accepted my lib but can’t use it, giving this error:

> undefined reference to `TMVA::Reader::Reader(TString const&, bool)’

I’m new to object oriented programming so I’m trying to try and error my way out.  
What I have tried to do so far:  
-removing the linking specification for the tmva lib of the root version implemented in the code  
-adding the linking to the new ver of libTMVA.so  
-trying to replace #include “TMVA/Reader.h” with #include “/tmva/tmva/inc/TMVA/Reader.h” (a folder copied from the source code of the new version of root).

I think that somehow my lib is compiled but I cant get the code to use its object.

Can anyone help me get out of this mess?

Thank you,  
Alberto

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [October 23, 2017, 5:13pm UTC](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644/2 "2017-10-23T17:13:19Z")

</div>

Unfortunately, I think the best approach here is to retrain your classifier in the old version of TMVA. We ensure that methods trained in an old version of TMVA will work in a newer one, but not the other way around.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![a.bragagnolo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@a.bragagnolo](https://root-forum.cern.ch/u/a.bragagnolo)\
**Post date:** [October 23, 2017, 5:32pm UTC](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644/3 "2017-10-23T17:32:52Z")

</div>

Is there a way to use an old version of tmva without recompile all the root package? Because it takes hours.

Alberto

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [October 23, 2017, 8:06pm UTC](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644/4 "2017-10-23T20:06:02Z")

</div>

If you can’t run the training on the machine you run the application on you could use lxplus and activate an appropriate root version e.g. `/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.06.02`.

Note that 6.06/01 is a development release and should not be used in production AFAIK.

Cheers,  
Kim
