# Is it possible to get information about training data at the application level? (TMVA)

**URL:** <https://root-forum.cern.ch/t/is-it-possible-to-get-information-about-training-data-at-the-application-level-tmva/27021>\
**Category:** TMVA\
**Created:** [November 23, 2017, 1:59pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-get-information-about-training-data-at-the-application-level-tmva/27021 "2017-11-23T13:59:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![p73](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/p73/32/14141_2.png) [@p73](https://root-forum.cern.ch/u/p73)\
**Post date:** [November 23, 2017, 1:59pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-get-information-about-training-data-at-the-application-level-tmva/27021/1 "2017-11-23T13:59:12Z")

</div>

I would like to separate the training and application processes so I could train method only once and then use it several times. Particularly, I need the information about number of training signal and background events at the application level. It seems I cannot get it from `xml` weights file. So is it possible to get that info somehow? (Probably using `TMVA::Reader`).  
I tried:

```auto
reader->DataInfo().GetDataSet()->GetNEvtSigTrain();

```

But I always get 1.

---

<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:** [November 24, 2017, 1:55pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-get-information-about-training-data-at-the-application-level-tmva/27021/2 "2017-11-24T13:55:10Z")

</div>

The reader takes all its information from the xml-file, so unless it’s there it cannot be retrieved. 😕

If this is related to your [other](https://root-forum.cern.ch/t/segmentation-violation-error-when-call-tmva-methodbase-getmaximumsignificance-method/27026) question I suggested a sketch for a workaround grabbing the efficiencies from the ROC curve there.

If you are interested in the total raw number of sig and bkg events you could read these from your input data, e.g. TTrees which can be done, although a bit inconveniently, at application time.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [December 8, 2017, 1:55pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-get-information-about-training-data-at-the-application-level-tmva/27021/3 "2017-12-08T13:55:20Z")

</div>

Closed on December 8, 2017, 1:55pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
