# TMVA

**URL:** https://root-forum.cern.ch/c/tmva/22.md?page=20

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

**Page:** 21

---

## [TMVA BDT Training seems to fail](https://root-forum.cern.ch/t/tmva-bdt-training-seems-to-fail/26779)

<div class="topic-metadata">

**Author:** [@gwatts](https://root-forum.cern.ch/u/gwatts)\
**Replies:** 11\
**Last updated:** [November 10, 2017, 3:40pm UTC](https://root-forum.cern.ch/t/tmva-bdt-training-seems-to-fail/26779 "2017-11-10T15:40:52Z")

</div>

I am doing a multi-class training of a BDT. In root v5 this was quite robust, in v6 I’m having a number of problems. In particular, this one: it seems to fail to train sometimes. Unfortunately, there are no errors messag…

---

## [Reweigh background events such that background distribution is identical to signal for BDT input variable](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826)

<div class="topic-metadata">

**Author:** [@Francesco\_Risitano](https://root-forum.cern.ch/u/Francesco_Risitano)\
**Replies:** 4\
**Last updated:** [November 8, 2017, 4:41pm UTC](https://root-forum.cern.ch/t/reweigh-background-events-such-that-background-distribution-is-identical-to-signal-for-bdt-input-variable/26826 "2017-11-08T16:41:49Z")

</div>

Hi all, I am currently developing a boosted decision tree classifier and some of the input variables I am using have a momentum dependence. I would like to provide momentum as an input variable but I am worried that if…

---

## [Using BDT to classify more than 2 categories (the usual background/signal)](https://root-forum.cern.ch/t/using-bdt-to-classify-more-than-2-categories-the-usual-background-signal/26811)

<div class="topic-metadata">

**Author:** [@jordan](https://root-forum.cern.ch/u/jordan)\
**Replies:** 2\
**Last updated:** [November 8, 2017, 8:44am UTC](https://root-forum.cern.ch/t/using-bdt-to-classify-more-than-2-categories-the-usual-background-signal/26811 "2017-11-08T08:44:20Z")

</div>

Dear all, I am new in using ROOT and TMVA and I have a generic question about what is possible to do with theses tools. I am interested in using a BDT (and maybe rectangular cuts) to separate my data in more than 2 ca…

---

## [\[DNN\] Train/Test Error = nan when using ReLU](https://root-forum.cern.ch/t/dnn-train-test-error-nan-when-using-relu/26536)

<div class="topic-metadata">

**Author:** [@a.bragagnolo](https://root-forum.cern.ch/u/a.bragagnolo)\
**Replies:** 6\
**Last updated:** [November 7, 2017, 8:58am UTC](https://root-forum.cern.ch/t/dnn-train-test-error-nan-when-using-relu/26536 "2017-11-07T08:58:06Z")

</div>

Hi, I’m trying to use the TMVA DNN method as classificator. I have no problem using the old good TANH activation function but nearly everytime I try using the RELU activator I get ‘nan’ both as Test Err. and Train Err. …

---

## [Problem with TMVA package. Factory methods are not known](https://root-forum.cern.ch/t/problem-with-tmva-package-factory-methods-are-not-known/26749)

<div class="topic-metadata">

**Author:** [@p73](https://root-forum.cern.ch/u/p73)\
**Replies:** 2\
**Last updated:** [October 31, 2017, 3:01pm UTC](https://root-forum.cern.ch/t/problem-with-tmva-package-factory-methods-are-not-known/26749 "2017-10-31T15:01:27Z")

</div>

I am trying to use TMVA algorithms for classification problem. Here is my program: #ifndef TMVACLASSIFICATION\_C #define TMVACLASSIFICATION\_C #include "TMVA/Types…

---

## [TMVA Conditional Compilation](https://root-forum.cern.ch/t/tmva-conditional-compilation/26752)

<div class="topic-metadata">

**Author:** [@cvarni](https://root-forum.cern.ch/u/cvarni)\
**Replies:** 3\
**Last updated:** [October 31, 2017, 1:48pm UTC](https://root-forum.cern.ch/t/tmva-conditional-compilation/26752 "2017-10-31T13:48:04Z")

</div>

Dear Experts, I’m in the need of producing a code that uses TMVA and is able to be run on ROOT v5 and v6. Since the TMVA API has changed I was thinking about a conditional compilation of the code so that I do not have …

---

## [How to use TMVA methods in a older version of root](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644)

<div class="topic-metadata">

**Author:** [@a.bragagnolo](https://root-forum.cern.ch/u/a.bragagnolo)\
**Replies:** 3\
**Last updated:** [October 23, 2017, 8:06pm UTC](https://root-forum.cern.ch/t/how-to-use-tmva-methods-in-a-older-version-of-root/26644 "2017-10-23T20:06:02Z")

</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) fr…

---

## [How to see the regression expression](https://root-forum.cern.ch/t/how-to-see-the-regression-expression/26429)

<div class="topic-metadata">

**Author:** [@uzair90](https://root-forum.cern.ch/u/uzair90)\
**Replies:** 1\
**Last updated:** [October 9, 2017, 7:40am UTC](https://root-forum.cern.ch/t/how-to-see-the-regression-expression/26429 "2017-10-09T07:40:30Z")

</div>

Hello, I just wanted to know that when we do a TMVA regression analysis how do we extract the expression that the TMVA training and testing has come up with for regression? I want to see that expression. Can someone ple…

---

## [TMVA installation error](https://root-forum.cern.ch/t/tmva-installation-error/24047)

<div class="topic-metadata">

**Author:** [@p73](https://root-forum.cern.ch/u/p73)\
**Replies:** 8\
**Last updated:** [September 20, 2017, 11:49am UTC](https://root-forum.cern.ch/t/tmva-installation-error/24047 "2017-09-20T11:49:10Z")

</div>

I am using ------------------------------------------------------------ | Welcome to ROOT 6.08/02 http://root.cern.ch | | (c) 1995-2016, The ROOT Team | | Built …

---

## [Does TMVA support multi-core or cluster mode?](https://root-forum.cern.ch/t/does-tmva-support-multi-core-or-cluster-mode/26155)

<div class="topic-metadata">

**Author:** [@QinGang](https://root-forum.cern.ch/u/QinGang)\
**Replies:** 5\
**Last updated:** [September 14, 2017, 9:05am UTC](https://root-forum.cern.ch/t/does-tmva-support-multi-core-or-cluster-mode/26155 "2017-09-14T09:05:59Z")

</div>

Dear Expert: Running TMVA DNN costs too long time, just wondering if TMVA supports multi-core or cluster mode? Cheers, Gang

---

## [Any documentation for DNN in TMVA](https://root-forum.cern.ch/t/any-documentation-for-dnn-in-tmva/22264)

<div class="topic-metadata">

**Author:** [@crazyqg](https://root-forum.cern.ch/u/crazyqg)\
**Replies:** 4\
**Last updated:** [September 9, 2017, 12:46pm UTC](https://root-forum.cern.ch/t/any-documentation-for-dnn-in-tmva/22264 "2017-09-09T12:46:32Z")

</div>

Dear experts: Just wondering if there is any official documentation for the DNN methods in TMVA? Is it using CNN as background algorithm or something else? What's the meaning of those parameters and options inside?…

---

## ['Factory' object has no attribute 'AddVariable' : in TMVA - python](https://root-forum.cern.ch/t/factory-object-has-no-attribute-addvariable-in-tmva-python/25090)

<div class="topic-metadata">

**Author:** [@Vidya\_Sagar\_V](https://root-forum.cern.ch/u/Vidya_Sagar_V)\
**Replies:** 4\
**Last updated:** [August 14, 2017, 5:05pm UTC](https://root-forum.cern.ch/t/factory-object-has-no-attribute-addvariable-in-tmva-python/25090 "2017-08-14T17:05:14Z")

</div>

When I try running TMVAClassification.py given in TMVA package I get the following output: Traceback (most recent call last): File "TMVAClassification.py", line 424, in \<module\> main() File "TMVAClassification…

---

## [TMVA output curves](https://root-forum.cern.ch/t/tmva-output-curves/25862)

<div class="topic-metadata">

**Author:** [@Geo](https://root-forum.cern.ch/u/Geo)\
**Replies:** 6\
**Last updated:** [August 9, 2017, 4:15pm UTC](https://root-forum.cern.ch/t/tmva-output-curves/25862 "2017-08-09T16:15:47Z")

</div>

Hi, when the tmva finishes the training phase and the gui pops up, the graphs that it prints have some problems. For example there are missing words from the legend of the graph (that explains each curve). Does anyone …

---

## [Extract weights xml file from output rootfile?](https://root-forum.cern.ch/t/extract-weights-xml-file-from-output-rootfile/25823)

<div class="topic-metadata">

**Author:** [@pietrovischia](https://root-forum.cern.ch/u/pietrovischia)\
**Replies:** 2\
**Last updated:** [August 6, 2017, 10:15am UTC](https://root-forum.cern.ch/t/extract-weights-xml-file-from-output-rootfile/25823 "2017-08-06T10:15:48Z")

</div>

Hi, are by any chance the training weights stored within the output rootfile? If so, is it possible to dump them again to an xml file (I am thinking at something like a button in TMVAGui, or something like that)? (or…

---

## [Tmva crashes at preparing gaussian transformation](https://root-forum.cern.ch/t/tmva-crashes-at-preparing-gaussian-transformation/25676)

<div class="topic-metadata">

**Author:** [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Replies:** 5\
**Last updated:** [August 2, 2017, 4:58pm UTC](https://root-forum.cern.ch/t/tmva-crashes-at-preparing-gaussian-transformation/25676 "2017-08-02T16:58:03Z")

</div>

I'm stuck on figuring what is the exact problem I'm facing as I try to test a simple classification script. I could run the tmva examples in ROOT. however for some reason I am not able to reproduce the same success on …

---

## [Problem with TMVApplication](https://root-forum.cern.ch/t/problem-with-tmvapplication/25785)

<div class="topic-metadata">

**Author:** [@Geo](https://root-forum.cern.ch/u/Geo)\
**Replies:** 3\
**Last updated:** [August 2, 2017, 2:06pm UTC](https://root-forum.cern.ch/t/problem-with-tmvapplication/25785 "2017-08-02T14:06:25Z")

</div>

Goodmorning, I was running a tmvapplication and although I have run it multiple times in the past, now I got the message: Warning in : The StreamerInfo of class TAttMarker read from file /afs/cern.ch/work/g/gbi…

---

## [Crashing when using pyroot and simple neural network in Keras via TMVA](https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666)

<div class="topic-metadata">

**Author:** [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Replies:** 2\
**Last updated:** [August 2, 2017, 10:29am UTC](https://root-forum.cern.ch/t/crashing-when-using-pyroot-and-simple-neural-network-in-keras-via-tmva/25666 "2017-08-02T10:29:41Z")

</div>

So I am using pyroot with the tmva feature through it to train a simple neural network constructed using KERAS (1 hidden layer with 3 neutron,5 input and 2 output). The training data is in .root with about 10^5 events. …

---

## [Variables order](https://root-forum.cern.ch/t/variables-order/25674)

<div class="topic-metadata">

**Author:** [@Amilkar](https://root-forum.cern.ch/u/Amilkar)\
**Replies:** 4\
**Last updated:** [July 25, 2017, 1:13pm UTC](https://root-forum.cern.ch/t/variables-order/25674 "2017-07-25T13:13:42Z")

</div>

I am using the macro $ROOTSYS/tutorials/tmva/TMVAClassification.C Running: root.exe TMVAClassification.C(\\"Cuts\\") The output: --- Cuts : Cut values for requested signal efficiency: 0.9 --- Cuts …

---

## [Questions about ROC curves (beginner with TMVA)](https://root-forum.cern.ch/t/questions-about-roc-curves-beginner-with-tmva/25474)

<div class="topic-metadata">

**Author:** [@Daniel\_Zheng](https://root-forum.cern.ch/u/Daniel_Zheng)\
**Replies:** 3\
**Last updated:** [July 20, 2017, 2:41pm UTC](https://root-forum.cern.ch/t/questions-about-roc-curves-beginner-with-tmva/25474 "2017-07-20T14:41:24Z")

</div>

If someone could clear this up it would be greatly appreciated! I am just having some confusion interpreting TMVA ROC curves and have not been able to find a clear answer. Say if we are plotting a ROC curve for a BDT, …

---

## [Use regressed value to discriminate two samples](https://root-forum.cern.ch/t/use-regressed-value-to-discriminate-two-samples/24565)

<div class="topic-metadata">

**Author:** [@Binghuan\_Li](https://root-forum.cern.ch/u/Binghuan_Li)\
**Replies:** 1\
**Last updated:** [July 19, 2017, 1:58pm UTC](https://root-forum.cern.ch/t/use-regressed-value-to-discriminate-two-samples/24565 "2017-07-19T13:58:19Z")

</div>

I try to first use regression to get the value of variable V, then use V to discriminate sample A and B. Dear Expert, The distribution of regression target V shows good separation between sample A and B. If I use only …

---

## [Unsupervise training in tmva](https://root-forum.cern.ch/t/unsupervise-training-in-tmva/25609)

<div class="topic-metadata">

**Author:** [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Replies:** 3\
**Last updated:** [July 19, 2017, 1:45pm UTC](https://root-forum.cern.ch/t/unsupervise-training-in-tmva/25609 "2017-07-19T13:45:27Z")

</div>

Is there a method in tmva for unsupervised learning? as in training data that does not have labels. or are there any progress in this area that can be shared at the moment? I found some slide through googling that thi…

---

## [DNN CPU training - Control over # threads used](https://root-forum.cern.ch/t/dnn-cpu-training-control-over-threads-used/25549)

<div class="topic-metadata">

**Author:** [@jonesc](https://root-forum.cern.ch/u/jonesc)\
**Replies:** 5\
**Last updated:** [July 19, 2017, 10:49am UTC](https://root-forum.cern.ch/t/dnn-cpu-training-control-over-threads-used/25549 "2017-07-19T10:49:12Z")

</div>

Is there a way to control (limit) the number of threads used by the DNN CPU training ? My use case is I am running trainings on a local batch system, which consists of nodes with 24 cores (48 w/ hyperthreading) and ne…

---

## [Making predictions with a Keras model inside TMVA?](https://root-forum.cern.ch/t/making-predictions-with-a-keras-model-inside-tmva/25595)

<div class="topic-metadata">

**Author:** [@ddroz](https://root-forum.cern.ch/u/ddroz)\
**Replies:** 5\
**Last updated:** [July 18, 2017, 2:51pm UTC](https://root-forum.cern.ch/t/making-predictions-with-a-keras-model-inside-tmva/25595 "2017-07-18T14:51:52Z")

</div>

Dear ROOTers, I've been using Python/Keras to train and evaluate a neural network. Now that the model is fully trained, I want to use it to make predictions. I can do that in Python with the usual Keras methods. Howe…

---

## [TMVA and Keras tutorials](https://root-forum.cern.ch/t/tmva-and-keras-tutorials/25315)

<div class="topic-metadata">

**Author:** [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Replies:** 2\
**Last updated:** [July 6, 2017, 1:14pm UTC](https://root-forum.cern.ch/t/tmva-and-keras-tutorials/25315 "2017-07-06T13:14:12Z")

</div>

There is an example about Keras in the tmva tutorial folder. I know that the documentation DNN is not up to date for tmva. I am wondering if anyone here knows about dnn and keras in detail could explain what does those e…

---

## [TMVA dealing tree with vary branch size in PyROOT](https://root-forum.cern.ch/t/tmva-dealing-tree-with-vary-branch-size-in-pyroot/25358)

<div class="topic-metadata">

**Author:** [@Danny\_Lee](https://root-forum.cern.ch/u/Danny_Lee)\
**Replies:** 3\
**Last updated:** [July 4, 2017, 4:05am UTC](https://root-forum.cern.ch/t/tmva-dealing-tree-with-vary-branch-size-in-pyroot/25358 "2017-07-04T04:05:00Z")

</div>

So I am trying to construct a training script for a root file that contain a tree with branch that contains different branch size, what i mean here is most of my branch has single float value but some branch has 2 float …

---

## [SeparationType option ignored for Gradient Boosted Decision trees?](https://root-forum.cern.ch/t/separationtype-option-ignored-for-gradient-boosted-decision-trees/25373)

<div class="topic-metadata">

**Author:** [@Andre\_Holzner](https://root-forum.cern.ch/u/Andre_Holzner)\
**Replies:** 3\
**Last updated:** [July 3, 2017, 12:50pm UTC](https://root-forum.cern.ch/t/separationtype-option-ignored-for-gradient-boosted-decision-trees/25373 "2017-07-03T12:50:49Z")

</div>

Hello, I tried to reproduce the calculation of variable importances for gradient boosted decision trees using GiniIndex as separation type with ROOT 6.08.06 . After some debugging it looks like that for gradient boos…

---

## [Trouble writing to file w/ TMVA](https://root-forum.cern.ch/t/trouble-writing-to-file-w-tmva/25298)

<div class="topic-metadata">

**Author:** [@Daniel\_Zheng](https://root-forum.cern.ch/u/Daniel_Zheng)\
**Replies:** 5\
**Last updated:** [June 26, 2017, 1:26pm UTC](https://root-forum.cern.ch/t/trouble-writing-to-file-w-tmva/25298 "2017-06-26T13:26:41Z")

</div>

The following is my code for a BDT using TMVA. I need it to write the BDT response to a file, but that just is not happening.. I suspect I'm not using the dataloader correctly, but I have messed with things with no succe…

---

## [Testing a BDT on a mixed sig/bg tree](https://root-forum.cern.ch/t/testing-a-bdt-on-a-mixed-sig-bg-tree/25281)

<div class="topic-metadata">

**Author:** [@gdule](https://root-forum.cern.ch/u/gdule)\
**Replies:** 1\
**Last updated:** [June 26, 2017, 9:35am UTC](https://root-forum.cern.ch/t/testing-a-bdt-on-a-mixed-sig-bg-tree/25281 "2017-06-26T09:35:37Z")

</div>

Hello, For the purpose of training the BDT, I must have a TreeS and a TreeB. However, after training my BDT, I would now like to test its abilities on some "real data", which means that the data is not separated to sig…

---

## [Not use a variable for some events](https://root-forum.cern.ch/t/not-use-a-variable-for-some-events/25289)

<div class="topic-metadata">

**Author:** [@Vidya\_Sagar\_V](https://root-forum.cern.ch/u/Vidya_Sagar_V)\
**Replies:** 1\
**Last updated:** [June 26, 2017, 7:30am UTC](https://root-forum.cern.ch/t/not-use-a-variable-for-some-events/25289 "2017-06-26T07:30:57Z")

</div>

I am training a neural network in TMVA with 9 variables. One of those variables has a fault. Initially, I had 320k events, but there is a problem with 70k of them. Is there a way where it uses all 9 variables for 250k ev…

---

## [Crash when trying to train a BDT using TMVAClassification.C](https://root-forum.cern.ch/t/crash-when-trying-to-train-a-bdt-using-tmvaclassification-c/25272)

<div class="topic-metadata">

**Author:** [@gdule](https://root-forum.cern.ch/u/gdule)\
**Replies:** 0\
**Last updated:** [June 23, 2017, 10:24am UTC](https://root-forum.cern.ch/t/crash-when-trying-to-train-a-bdt-using-tmvaclassification-c/25272 "2017-06-23T10:24:43Z")

</div>

EDIT: Problem solved, the problem was not having a 'weight' leaf in my tree.

[Previous page](https://root-forum.cern.ch/c/tmva/22.md?page=19)

[Next page](https://root-forum.cern.ch/c/tmva/22.md?page=21)
