# TMVA

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

[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:** 15

---

## [Memory leak in Factory::TrainAllMethods?](https://root-forum.cern.ch/t/memory-leak-in-factory-trainallmethods/34531)

<div class="topic-metadata">

**Author:** [@a.bragagnolo](https://root-forum.cern.ch/u/a.bragagnolo)\
**Replies:** 4\
**Last updated:** [June 14, 2019, 11:21am UTC](https://root-forum.cern.ch/t/memory-leak-in-factory-trainallmethods/34531 "2019-06-14T11:21:04Z")

</div>

Hi ROOT experts, I’m noticing a memory leak in Factory::TrainAllMethods. I do not know if it is intended or it is a bug. I’m experiencing this while training several methods with a large dataset, inside the same factor…

---

## [Xgboost error: ValueError: Unable to parse node: 0:\[](https://root-forum.cern.ch/t/xgboost-error-valueerror-unable-to-parse-node-0/34598)

<div class="topic-metadata">

**Author:** [@sciencetruth991](https://root-forum.cern.ch/u/sciencetruth991)\
**Replies:** 1\
**Last updated:** [June 14, 2019, 10:19am UTC](https://root-forum.cern.ch/t/xgboost-error-valueerror-unable-to-parse-node-0/34598 "2019-06-14T10:19:56Z")

</div>

when I use xgboost plot the decision tree, I encounter an error: Unable to parse node. please help me fix the problem, thanks.

---

## [Node purity calculation/definition](https://root-forum.cern.ch/t/node-purity-calculation-definition/34575)

<div class="topic-metadata">

**Author:** [@JoshuaC](https://root-forum.cern.ch/u/JoshuaC)\
**Replies:** 3\
**Last updated:** [June 14, 2019, 10:12am UTC](https://root-forum.cern.ch/t/node-purity-calculation-definition/34575 "2019-06-14T10:12:59Z")

</div>

I’m having some trouble understanding the NodePurityLimit and SeparationType hyperparameters used to train a BDT. Purity refers to how many events of one type end up a leaf, but page 117 of the TMVA user guide says abou…

---

## [TMVA tutorials can only run once?](https://root-forum.cern.ch/t/tmva-tutorials-can-only-run-once/34539)

<div class="topic-metadata">

**Author:** [@ReynLieu](https://root-forum.cern.ch/u/ReynLieu)\
**Replies:** 4\
**Last updated:** [June 12, 2019, 5:06pm UTC](https://root-forum.cern.ch/t/tmva-tutorials-can-only-run-once/34539 "2019-06-12T17:06:55Z")

</div>

Hi ROOTers, My first question in this forum. I run the code under directory of tutorial/tmva, such as “root -l TMVAClassification.C”. After it completes, I will go into the interface of root. But when I want to run it a…

---

## [TMVA not showing plots on SWAN](https://root-forum.cern.ch/t/tmva-not-showing-plots-on-swan/29762)

<div class="topic-metadata">

**Author:** [@adrian.gutierrez.vaz](https://root-forum.cern.ch/u/adrian.gutierrez.vaz)\
**Replies:** 8\
**Last updated:** [June 12, 2019, 3:45pm UTC](https://root-forum.cern.ch/t/tmva-not-showing-plots-on-swan/29762 "2019-06-12T15:45:52Z")

</div>

Hi dear experts, I am currently using TMVA to study some particular type of signal. When I finish my training, testing and evaluation I wanna see some graphs produce by the TMVA (such as the roc curve, Output Distributi…

---

## [RTMVA with XGBoost in SWAN](https://root-forum.cern.ch/t/rtmva-with-xgboost-in-swan/34512)

<div class="topic-metadata">

**Author:** [@lata](https://root-forum.cern.ch/u/lata)\
**Replies:** 2\
**Last updated:** [June 12, 2019, 5:23am UTC](https://root-forum.cern.ch/t/rtmva-with-xgboost-in-swan/34512 "2019-06-12T05:23:41Z")

</div>

Dear Experts, I am trying to book this method for training with XGBoost factory.BookMethod(loader,TMVA.Types.kRXBG, “RXGB”, “!V:NRounds=80:MaxDepth=2:Eta=1”); but somehow I am not able to use XGBoost. Could you please…

---

## [Tensorflow crashes when factory has more than one pyKeras model booked](https://root-forum.cern.ch/t/tensorflow-crashes-when-factory-has-more-than-one-pykeras-model-booked/34509)

<div class="topic-metadata">

**Author:** [@a.bragagnolo](https://root-forum.cern.ch/u/a.bragagnolo)\
**Replies:** 1\
**Last updated:** [June 11, 2019, 9:43am UTC](https://root-forum.cern.ch/t/tensorflow-crashes-when-factory-has-more-than-one-pykeras-model-booked/34509 "2019-06-11T09:43:43Z")

</div>

Hi, up until some time ago I used a script similar to this to train a bunch of keras models to tune the parameters def getKerasModel(inputDim, modelName, nLayers = 3, layerSize = 200, dropValue = 0.2, optLabel = 'adam'…

---

## [TMVA overtraining check for classifier](https://root-forum.cern.ch/t/tmva-overtraining-check-for-classifier/34454)

<div class="topic-metadata">

**Author:** [@renyc96](https://root-forum.cern.ch/u/renyc96)\
**Replies:** 1\
**Last updated:** [June 6, 2019, 5:47pm UTC](https://root-forum.cern.ch/t/tmva-overtraining-check-for-classifier/34454 "2019-06-06T17:47:35Z")

</div>

Dear TMVA-experts， The values of Kolmogorv-Smirnov test change every time I turn out overtraining check for classifier,which one is reliable? Thanks！ Ren

---

## [Dataloader GetCorrelationMatrix](https://root-forum.cern.ch/t/dataloader-getcorrelationmatrix/34439)

<div class="topic-metadata">

**Author:** [@ethorpe](https://root-forum.cern.ch/u/ethorpe)\
**Replies:** 2\
**Last updated:** [June 6, 2019, 5:43pm UTC](https://root-forum.cern.ch/t/dataloader-getcorrelationmatrix/34439 "2019-06-06T17:43:19Z")

</div>

Hi, I’m attempting to use h2D = dataloader.GetCorrelationMatrix(“Signal”) to use the TMVA functionality to draw a correlation matrix only This is currently returning a null pointer for me dataloader = TMVA.DataLoad…

---

## [Cannot pass more than 9 arguments with TMVA::DataLoader::AddVariable](https://root-forum.cern.ch/t/cannot-pass-more-than-9-arguments-with-tmva-addvariable/34348)

<div class="topic-metadata">

**Author:** [@piedra](https://root-forum.cern.ch/u/piedra)\
**Replies:** 3\
**Last updated:** [June 4, 2019, 3:14pm UTC](https://root-forum.cern.ch/t/cannot-pass-more-than-9-arguments-with-tmva-addvariable/34348 "2019-06-04T15:14:05Z")

</div>

Hi. I am using a BDT to separate signal from background. When trying to define variables not available in the input trees, I have found that the new variables cannot have more than 9 arguments. To be more precise, now I…

---

## [TMVA::evaluate function for BDT score of each event](https://root-forum.cern.ch/t/tmva-evaluate-function-for-bdt-score-of-each-event/34310)

<div class="topic-metadata">

**Author:** [@Prasant](https://root-forum.cern.ch/u/Prasant)\
**Replies:** 1\
**Last updated:** [May 29, 2019, 11:33am UTC](https://root-forum.cern.ch/t/tmva-evaluate-function-for-bdt-score-of-each-event/34310 "2019-05-29T11:33:25Z")

</div>

Hii all, I am wondering, how the evaluation is really being done when I am applying the TMVA weights (obtained from a BDT training) to classify the events in a test sample as signal like or background like. How the BDT…

---

## [TMVA signal vs. background BDT response plot generated with macro radically different from manually generated plot](https://root-forum.cern.ch/t/tmva-signal-vs-background-bdt-response-plot-generated-with-macro-radically-different-from-manually-generated-plot/34002)

<div class="topic-metadata">

**Author:** [@JoshuaC](https://root-forum.cern.ch/u/JoshuaC)\
**Replies:** 5\
**Last updated:** [May 16, 2019, 1:28pm UTC](https://root-forum.cern.ch/t/tmva-signal-vs-background-bdt-response-plot-generated-with-macro-radically-different-from-manually-generated-plot/34002 "2019-05-16T13:28:44Z")

</div>

Using the TMVAGUI plotting macro I’ve generated the following response plot (left) If I manually recreate this plot however, I get the following (right) I’ve checked the weights and as far as I know they are the same…

---

## [Loading model\_cnn.h5 model failured in TMVA](https://root-forum.cern.ch/t/loading-model-cnn-h5-model-failured-in-tmva/34032)

<div class="topic-metadata">

**Author:** [@sciencetruth991](https://root-forum.cern.ch/u/sciencetruth991)\
**Replies:** 2\
**Last updated:** [May 15, 2019, 7:02am UTC](https://root-forum.cern.ch/t/loading-model-cnn-h5-model-failured-in-tmva/34032 "2019-05-15T07:02:35Z")

</div>

I book a CNN method, factory.BookMethod(&loader, TMVA::Types::kPyKeras, “PyKeras”,“H:!V:VarTransform=None:FilenameModel=model\_cnn.h5:” “FilenameTrainedModel=trained\_model\_cnn.h5:NumEpochs=20:BatchSize=256”); but it f…

---

## [How set set up configuration of DNN and CNN](https://root-forum.cern.ch/t/how-set-set-up-configuration-of-dnn-and-cnn/34009)

<div class="topic-metadata">

**Author:** [@sciencetruth991](https://root-forum.cern.ch/u/sciencetruth991)\
**Replies:** 1\
**Last updated:** [May 11, 2019, 9:05am UTC](https://root-forum.cern.ch/t/how-set-set-up-configuration-of-dnn-and-cnn/34009 "2019-05-11T09:05:09Z")

</div>

I have six input variables putting into the DNN and CNN model. How to set up the configuration, like layout and training? My code is below, but it terminates when I run the code. The BDT method works well, while DNN and …

---

## [DataLoader path for temporary files](https://root-forum.cern.ch/t/dataloader-path-for-temporary-files/33278)

<div class="topic-metadata">

**Author:** [@rustem](https://root-forum.cern.ch/u/rustem)\
**Replies:** 6\
**Last updated:** [May 9, 2019, 4:48pm UTC](https://root-forum.cern.ch/t/dataloader-path-for-temporary-files/33278 "2019-05-09T16:48:16Z")

</div>

Hello, Is there a way to specify a directory path where TMVA::DataLoader puts temporary files when running these steps? TMVA::Factory TrainAllMethods(); TMVA::Factory TestAllMethods(); TMVA::Factory EvaluateAllMethod…

---

## [Proper obtaining and comparison of results from HyperparameterOptimisation](https://root-forum.cern.ch/t/proper-obtaining-and-comparison-of-results-from-hyperparameteroptimisation/33838)

<div class="topic-metadata">

**Author:** [@Olena](https://root-forum.cern.ch/u/Olena)\
**Replies:** 5\
**Last updated:** [May 6, 2019, 1:30pm UTC](https://root-forum.cern.ch/t/proper-obtaining-and-comparison-of-results-from-hyperparameteroptimisation/33838 "2019-05-06T13:30:03Z")

</div>

Dear Experts, I am training a BDT with TMVA and would like to perform a hyperparameters optimisation. I would like to use HyperParameterOptimisation that is not yet documented. For the training, I use ~1.2 mill signal …

---

## [The return value of TMVA::EvaluateMulticlass()](https://root-forum.cern.ch/t/the-return-value-of-tmva-evaluatemulticlass/33858)

<div class="topic-metadata">

**Author:** [@Chenji\_Han](https://root-forum.cern.ch/u/Chenji_Han)\
**Replies:** 2\
**Last updated:** [May 2, 2019, 5:04pm UTC](https://root-forum.cern.ch/t/the-return-value-of-tmva-evaluatemulticlass/33858 "2019-05-02T17:04:24Z")

</div>

Hi, I am new to TMVA. I want to use the multi-classification algorithm, but I am confused about the meaning of the return value of the function EvaluateMulticlass(); I guess it returns an array of scores, which indicate…

---

## [TMlpANN broken in recent ROOT versions?](https://root-forum.cern.ch/t/tmlpann-broken-in-recent-root-versions/32867)

<div class="topic-metadata">

**Author:** [@Yoann](https://root-forum.cern.ch/u/Yoann)\
**Replies:** 5\
**Last updated:** [April 30, 2019, 5:28pm UTC](https://root-forum.cern.ch/t/tmlpann-broken-in-recent-root-versions/32867 "2019-04-30T17:28:45Z")

</div>

Dear TMVAers, I recently upgraded from ROOT-6.05.02 to ROOT-6.14.06. I observed that after a successful training using the TMlpANN algorithm, the classification application, performed using reader-\>BookMVA(“TMlpANN”,we…

---

## [Switch the testing and training events](https://root-forum.cern.ch/t/switch-the-testing-and-training-events/33663)

<div class="topic-metadata">

**Author:** [@amytee](https://root-forum.cern.ch/u/amytee)\
**Replies:** 6\
**Last updated:** [April 25, 2019, 5:08pm UTC](https://root-forum.cern.ch/t/switch-the-testing-and-training-events/33663 "2019-04-25T17:08:56Z")

</div>

Hi, I am using a BDT and currently half the events in my signal and background samples are used for the training and half for the evalating. As such, my results only contain the evaluated results, which is half of my ev…

---

## [How to train/test with tree contains TClonesArray](https://root-forum.cern.ch/t/how-to-train-test-with-tree-contains-tclonesarray/33732)

<div class="topic-metadata">

**Author:** [@wellatiger](https://root-forum.cern.ch/u/wellatiger)\
**Replies:** 1\
**Last updated:** [April 23, 2019, 3:11pm UTC](https://root-forum.cern.ch/t/how-to-train-test-with-tree-contains-tclonesarray/33732 "2019-04-23T15:11:53Z")

</div>

Dear experts, I know how to use TMVA/PyMVA for training/testing with simple tree structure for MultiClass Classification. But if I have a tree that contains TClonesArray of variables that I want to train on (event loop …

---

## [PyKeras with event-by-event weights](https://root-forum.cern.ch/t/pykeras-with-event-by-event-weights/33586)

<div class="topic-metadata">

**Author:** [@Archil](https://root-forum.cern.ch/u/Archil)\
**Replies:** 6\
**Last updated:** [April 23, 2019, 11:29am UTC](https://root-forum.cern.ch/t/pykeras-with-event-by-event-weights/33586 "2019-04-23T11:29:52Z")

</div>

Hello, Can you please tell me how I can use event-by-event weights in the PyKeras training? I found the following example of PyKeras usage, but it use trees without event weights: https://nbviewer.jupyter.org/github/i…

---

## [How is the background efficiency calculated?](https://root-forum.cern.ch/t/how-is-the-background-efficiency-calculated/33647)

<div class="topic-metadata">

**Author:** [@Einsiedler](https://root-forum.cern.ch/u/Einsiedler)\
**Replies:** 3\
**Last updated:** [April 23, 2019, 9:40am UTC](https://root-forum.cern.ch/t/how-is-the-background-efficiency-calculated/33647 "2019-04-23T09:40:08Z")

</div>

Dear TMVA users, I wanted to know how the background efficiency is calculated (based on mvaeffs.cxx). Assuming that the confusion matrix is used for such purpose, how do you calculated the TRUE NEGATIVE and FALSE POSITI…

---

## [How to specify different input files for training and testing events?](https://root-forum.cern.ch/t/how-to-specify-different-input-files-for-training-and-testing-events/33549)

<div class="topic-metadata">

**Author:** [@Einsiedler](https://root-forum.cern.ch/u/Einsiedler)\
**Replies:** 2\
**Last updated:** [April 12, 2019, 5:14pm UTC](https://root-forum.cern.ch/t/how-to-specify-different-input-files-for-training-and-testing-events/33549 "2019-04-12T17:14:04Z")

</div>

Dear TMVA users, I was wondering if there was any simple way to specify two different files in TMVAClassification.C for both training and testing samples rather than having the algorithm pick them randomly from one sing…

---

## [Memory management of TMVA::DNN::CNN](https://root-forum.cern.ch/t/memory-management-of-tmva-cnn/33453)

<div class="topic-metadata">

**Author:** [@Hercules\_Jack](https://root-forum.cern.ch/u/Hercules_Jack)\
**Replies:** 5\
**Last updated:** [April 8, 2019, 1:45pm UTC](https://root-forum.cern.ch/t/memory-management-of-tmva-cnn/33453 "2019-04-08T13:45:56Z")

</div>

Hi, I’m trying to use ROOT’s CNN to train a classifier. The dataset is about 3GB but I only have 32GB memory, so every time it crashes when loading the data: log1.txt (5.7 KB). I think if we use SGD to train, in each st…

---

## [How the BDTG classifier response is obtained in TMVA?](https://root-forum.cern.ch/t/how-the-bdtg-classifier-response-is-obtained-in-tmva/33387)

<div class="topic-metadata">

**Author:** [@Hai\_Jiang](https://root-forum.cern.ch/u/Hai_Jiang)\
**Replies:** 6\
**Last updated:** [April 4, 2019, 1:24pm UTC](https://root-forum.cern.ch/t/how-the-bdtg-classifier-response-is-obtained-in-tmva/33387 "2019-04-04T13:24:18Z")

</div>

Dear all TMVA experts, Anyone knows how the BDTG response (probability of signal-like and background-like?) is calculated in the TMVA? Is it obtained from the signal-like votes percentage of all the trees trained in th…

---

## [How gradient decent implemented in BDTG model?](https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374)

<div class="topic-metadata">

**Author:** [@Hai\_Jiang1](https://root-forum.cern.ch/u/Hai_Jiang1)\
**Replies:** 2\
**Last updated:** [April 3, 2019, 11:03am UTC](https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374 "2019-04-03T11:03:56Z")

</div>

Dear all TMVA experts, I am a little bit confused on how the gradient decent optimization implemented in the BDTG(Gradient Boosting Decision Tree), because cost function of the BDTG model is to minimize the mis-classifi…

---

## [Help with training model on TMVA::DNN](https://root-forum.cern.ch/t/help-with-training-model-on-tmva-dnn/33213)

<div class="topic-metadata">

**Author:** [@glitch401](https://root-forum.cern.ch/u/glitch401)\
**Replies:** 1\
**Last updated:** [March 25, 2019, 4:22pm UTC](https://root-forum.cern.ch/t/help-with-training-model-on-tmva-dnn/33213 "2019-03-25T16:22:49Z")

</div>

Greetings , I was trying to interpret the following python code using TMVA::DNN Python Code : model.add(LSTM(250,input\_shape=(7,1))) model.add(Dense(1)) model.compile(optimizer=‘adam’,loss=‘mse’) Using TMVA::DNN “…

---

## [Discrepancy between BTDG Overtraining plots produced by TMVAClassification and BDTG distribution on analysis sample](https://root-forum.cern.ch/t/discrepancy-between-btdg-overtraining-plots-produced-by-tmvaclassification-and-bdtg-distribution-on-analysis-sample/33017)

<div class="topic-metadata">

**Author:** [@lattaud](https://root-forum.cern.ch/u/lattaud)\
**Replies:** 15\
**Last updated:** [March 19, 2019, 8:17am UTC](https://root-forum.cern.ch/t/discrepancy-between-btdg-overtraining-plots-produced-by-tmvaclassification-and-bdtg-distribution-on-analysis-sample/33017 "2019-03-19T08:17:16Z")

</div>

Dear TMVA experts, I’m using in my analysis a BDTG to classify two different population of events. I’m a bit confused by the BDTG output I get . The distribution observed with the over-training check (run by TMVA on t…

---

## [About BDTG method for Multiclassification problems](https://root-forum.cern.ch/t/about-bdtg-method-for-multiclassification-problems/33124)

<div class="topic-metadata">

**Author:** [@mlizzo](https://root-forum.cern.ch/u/mlizzo)\
**Replies:** 4\
**Last updated:** [March 13, 2019, 3:44pm UTC](https://root-forum.cern.ch/t/about-bdtg-method-for-multiclassification-problems/33124 "2019-03-13T15:44:53Z")

</div>

Dear TMVA experts, I would like to ask you some questions about how does the BDTG method work for multiclass applications, since I didn’t found much about that in the Users guide and I am a novice in this field: Are l…

---

## [Different classifier output for same input](https://root-forum.cern.ch/t/different-classifier-output-for-same-input/33014)

<div class="topic-metadata">

**Author:** [@Suyog.Shrestha](https://root-forum.cern.ch/u/Suyog.Shrestha)\
**Replies:** 3\
**Last updated:** [March 13, 2019, 2:35pm UTC](https://root-forum.cern.ch/t/different-classifier-output-for-same-input/33014 "2019-03-13T14:35:11Z")

</div>

Dear TMVA experts, We observe a curious feature when we updated TMVA from version 4.20 to the default in Root 6.14.04. In both cases, we keep everything constant - input variables, signal and background. The only excep…

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

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