# TMVA

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

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

---

## [Question about error when using TMVA](https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319)

<div class="topic-metadata">

**Author:** [@StephenChao](https://root-forum.cern.ch/u/StephenChao)\
**Replies:** 2\
**Last updated:** [January 31, 2023, 8:57am UTC](https://root-forum.cern.ch/t/question-about-error-when-using-tmva/53319 "2023-01-31T08:57:48Z")

</div>

Dear experts, When I used the Fisher method in TMVA, I booked the method like this: if (Use\["Fisher"\]) factory-\>BookMethod( dataloader, TMVA::Types::kFisher, "Fisher", "H:!V:Fisher:VarTransform=None:CreateMVAPd…

---

## [Compilation error for TMVA Reader() and Instances()](https://root-forum.cern.ch/t/compilation-error-for-tmva-reader-and-instances/53195)

<div class="topic-metadata">

**Author:** [@Nihar\_Saha](https://root-forum.cern.ch/u/Nihar_Saha)\
**Replies:** 4\
**Last updated:** [January 21, 2023, 9:19am UTC](https://root-forum.cern.ch/t/compilation-error-for-tmva-reader-and-instances/53195 "2023-01-21T09:19:16Z")

</div>

Dear experts, While I was compiling my c++ code (hist\_mass\_vn.C) with the following command it is showing me some errors mentioned below. In my code, I am using the TMVA Reader() and the .xml files that are produced aft…

---

## [Training TMultiLayerPerceptron in multi-core mode](https://root-forum.cern.ch/t/training-tmultilayerperceptron-in-multi-core-mode/52929)

<div class="topic-metadata">

**Author:** [@garciaduarte1](https://root-forum.cern.ch/u/garciaduarte1)\
**Replies:** 5\
**Last updated:** [January 5, 2023, 8:48pm UTC](https://root-forum.cern.ch/t/training-tmultilayerperceptron-in-multi-core-mode/52929 "2023-01-05T20:48:35Z")

</div>

I am training a TMultiLayerPerceptron neural network that has 11 neurons in the input and output layers (with continuous values in the interval \[0,1\]), with three hidden layers, each with 50 neurons. It takes more than 1…

---

## [What is the correct input format for xgboost trained on pandas dataframes](https://root-forum.cern.ch/t/what-is-the-correct-input-format-for-xgboost-trained-on-pandas-dataframes/52877)

<div class="topic-metadata">

**Author:** [@David\_Marckx](https://root-forum.cern.ch/u/David_Marckx)\
**Replies:** 2\
**Last updated:** [January 5, 2023, 4:26pm UTC](https://root-forum.cern.ch/t/what-is-the-correct-input-format-for-xgboost-trained-on-pandas-dataframes/52877 "2023-01-05T16:26:05Z")

</div>

I am a newbie at integrating external ML libraries into TMVA. I trained a xgboost model with the sklearn wrapper and saved it: bst = XGBClassifier(...) bst.fit(X\_train, y\_train, sample\_weight=weight\_train\_balanced) #(x…

---

## [Putting SOFIE code into a library](https://root-forum.cern.ch/t/putting-sofie-code-into-a-library/52608)

<div class="topic-metadata">

**Author:** [@Dave\_Brown](https://root-forum.cern.ch/u/Dave_Brown)\
**Replies:** 6\
**Last updated:** [December 19, 2022, 8:51am UTC](https://root-forum.cern.ch/t/putting-sofie-code-into-a-library/52608 "2022-12-19T08:51:39Z")

</div>

I’ve been experimenting with putting the c++ code generated by the TMVA\_SOFIE\_KERAS tutorial into a library so that it can be linked with other codes. I was able to do that by making 2 modifications: separating the Se…

---

## [A question about Fisher Method in TMVA](https://root-forum.cern.ch/t/a-question-about-fisher-method-in-tmva/52722)

<div class="topic-metadata">

**Author:** [@StephenChao](https://root-forum.cern.ch/u/StephenChao)\
**Replies:** 2\
**Last updated:** [December 13, 2022, 3:46pm UTC](https://root-forum.cern.ch/t/a-question-about-fisher-method-in-tmva/52722 "2022-12-13T15:46:33Z")

</div>

Dear experts, Recently when I was using the Fisher Method with TMVA, I got this error: \<FATAL\> : \<GetFisherCoeff\> matrix is singular with determinant=3.21102e-143 did you use the variables that …

---

## [A question about why TMVA not processing](https://root-forum.cern.ch/t/a-question-about-why-tmva-not-processing/52702)

<div class="topic-metadata">

**Author:** [@StephenChao](https://root-forum.cern.ch/u/StephenChao)\
**Replies:** 2\
**Last updated:** [December 13, 2022, 3:26pm UTC](https://root-forum.cern.ch/t/a-question-about-why-tmva-not-processing/52702 "2022-12-13T15:26:23Z")

</div>

Dear experts, Recently when I used the TMVA, the program will not show the result like it did before, and just stoped and quitted like the screenshot below. But in the past the same code would continue running until the…

---

## [A question about how to set the classifier range](https://root-forum.cern.ch/t/a-question-about-how-to-set-the-classifier-range/52443)

<div class="topic-metadata">

**Author:** [@StephenChao](https://root-forum.cern.ch/u/StephenChao)\
**Replies:** 3\
**Last updated:** [December 9, 2022, 3:57am UTC](https://root-forum.cern.ch/t/a-question-about-how-to-set-the-classifier-range/52443 "2022-12-09T03:57:04Z")

</div>

Dear experts, When I booked the Fisher method and get the output classifier, I will always got the classifier in range\[-0.6,0.6\]. While in our analysis we typically want a classifier in range \[0,1\]. Although I know I c…

---

## [Random seed in BDT](https://root-forum.cern.ch/t/random-seed-in-bdt/52642)

<div class="topic-metadata">

**Author:** [@petrakou](https://root-forum.cern.ch/u/petrakou)\
**Replies:** 5\
**Last updated:** [December 7, 2022, 3:28pm UTC](https://root-forum.cern.ch/t/random-seed-in-bdt/52642 "2022-12-07T15:28:21Z")

</div>

Hi, Is the random seed in BDT fixed or free by default? How can we set its value? (The manual doesn’t seem to point to a related variable.) Thanks.

---

## [MinNodeSize (1 vs 1% in the config file)](https://root-forum.cern.ch/t/minnodesize-1-vs-1-in-the-config-file/52662)

<div class="topic-metadata">

**Author:** [@jguhit](https://root-forum.cern.ch/u/jguhit)\
**Replies:** 3\
**Last updated:** [December 6, 2022, 4:54pm UTC](https://root-forum.cern.ch/t/minnodesize-1-vs-1-in-the-config-file/52662 "2022-12-06T16:54:59Z")

</div>

Hi, I would like to ask a question about how MinNodSize hyper parameter is treated in the tmva, we create a macro in python that accepts a config file with all of the hyper parameters used for tmva. And I would like to …

---

## [JupyROOT: SetInputTrees fails](https://root-forum.cern.ch/t/jupyroot-setinputtrees-fails/52426)

<div class="topic-metadata">

**Author:** [@petrakou](https://root-forum.cern.ch/u/petrakou)\
**Replies:** 3\
**Last updated:** [December 1, 2022, 6:27pm UTC](https://root-forum.cern.ch/t/jupyroot-setinputtrees-fails/52426 "2022-12-01T18:27:40Z")

</div>

Hello, What the title says. I’m trying to get signal and background events from the same tree. But when I run: thetree = inputFile.Get("myTree") sigCut = ROOT.TCut("Class\>1") bgCut = ROOT.TCut("Class\<1") dataloade…

---

## [JupyROOT: progress not shown](https://root-forum.cern.ch/t/jupyroot-progress-not-shown/52366)

<div class="topic-metadata">

**Author:** [@petrakou](https://root-forum.cern.ch/u/petrakou)\
**Replies:** 3\
**Last updated:** [November 18, 2022, 10:26am UTC](https://root-forum.cern.ch/t/jupyroot-progress-not-shown/52366 "2022-11-18T10:26:02Z")

</div>

Good morning, When I run TMVA training, testing etc. on JupyROOT, there is no output while the code is running. Everything, including progress messages, gets printed when it is over. How do I remedy this? Thanks in ad…

---

## [How to evaluate XML file for MVA trained with PyTorch within RDataFrame?](https://root-forum.cern.ch/t/how-to-evaluate-xml-file-for-mva-trained-with-pytorch-within-rdataframe/52299)

<div class="topic-metadata">

**Author:** [@kyoon](https://root-forum.cern.ch/u/kyoon)\
**Replies:** 7\
**Last updated:** [November 15, 2022, 3:16pm UTC](https://root-forum.cern.ch/t/how-to-evaluate-xml-file-for-mva-trained-with-pytorch-within-rdataframe/52299 "2022-11-15T15:16:31Z")

</div>

Hello, Referring to this thread, we are loading .xml files generated from TMVA using RReader and RDataFrame for our analysis. While it works fine for BDT, we are having trouble loading a neural network model trained wit…

---

## [A question about using the results from Fisher method](https://root-forum.cern.ch/t/a-question-about-using-the-results-from-fisher-method/52362)

<div class="topic-metadata">

**Author:** [@StephenChao](https://root-forum.cern.ch/u/StephenChao)\
**Replies:** 4\
**Last updated:** [November 15, 2022, 12:11pm UTC](https://root-forum.cern.ch/t/a-question-about-using-the-results-from-fisher-method/52362 "2022-11-15T12:11:49Z")

</div>

Dear experts, I have a question with using the results of Fisher method and want to ask for your advice kindly. To be specific, I have a set of 37 input variables, and I successfully ran the TMVAClassification.C with m…

---

## [TMVA GUI in JupyROOT in Windows?](https://root-forum.cern.ch/t/tmva-gui-in-jupyroot-in-windows/52333)

<div class="topic-metadata">

**Author:** [@petrakou](https://root-forum.cern.ch/u/petrakou)\
**Replies:** 6\
**Last updated:** [November 14, 2022, 2:16pm UTC](https://root-forum.cern.ch/t/tmva-gui-in-jupyroot-in-windows/52333 "2022-11-14T14:16:00Z")

</div>

Please help… TMVA feels very reduced if we can’t run the GUI. :slight\_smile: When I run ROOT.TMVA.TMVAGui(fileName) I get this: — Launch TMVA GUI to view input file: test.root === Note: inactive buttons indicate …

---

## [TMVA cross validation over training check and K-S test](https://root-forum.cern.ch/t/tmva-cross-validation-over-training-check-and-k-s-test/52087)

<div class="topic-metadata">

**Author:** [@Yao\_Yao](https://root-forum.cern.ch/u/Yao_Yao)\
**Replies:** 2\
**Last updated:** [November 1, 2022, 5:11pm UTC](https://root-forum.cern.ch/t/tmva-cross-validation-over-training-check-and-k-s-test/52087 "2022-11-01T17:11:58Z")

</div>

Dear experts, I am using a 10-fold cross validation to train and test a signal vs background analysis, and I am looking into the over-training plot in the TMVAGui, that has the training and testing events plotted on the…

---

## [Loss functions for BDTG](https://root-forum.cern.ch/t/loss-functions-for-bdtg/52125)

<div class="topic-metadata">

**Author:** [@smitmatt](https://root-forum.cern.ch/u/smitmatt)\
**Replies:** 1\
**Last updated:** [October 28, 2022, 8:02am UTC](https://root-forum.cern.ch/t/loss-functions-for-bdtg/52125 "2022-10-28T08:02:02Z")

</div>

Good afternoon, I have two questions concerning the loss functions used for the Gradient Boosted Decision Tree TMVA method. What is the default loss function used? This post here pretty clearly states it is cross-en…

---

## [About TMVA application](https://root-forum.cern.ch/t/about-tmva-application/31972)

<div class="topic-metadata">

**Author:** [@JungChang](https://root-forum.cern.ch/u/JungChang)\
**Replies:** 3\
**Last updated:** [October 21, 2022, 3:11am UTC](https://root-forum.cern.ch/t/about-tmva-application/31972 "2022-10-21T03:11:12Z")

</div>

Dear Sir, I’m training TMVA with backgrounds, and applied the classifier on each back separately. I got a background efficiency from the training. After application, I will obtained efficiency for each background. Whe…

---

## [Pytorch and TMVA: Failed to get predictions](https://root-forum.cern.ch/t/pytorch-and-tmva-failed-to-get-predictions/47463)

<div class="topic-metadata">

**Author:** [@fjh](https://root-forum.cern.ch/u/fjh)\
**Replies:** 5\
**Last updated:** [October 20, 2022, 12:08pm UTC](https://root-forum.cern.ch/t/pytorch-and-tmva-failed-to-get-predictions/47463 "2022-10-20T12:08:22Z")

</div>

when l run the following URL on Tutorial: TMVA PyTorch Interface | GSoC , the following error occurs when l run the line of code All, please do you know what causes this? thank you very much! runtime\_error …

---

## [TMVAMulticlass Specifying training / testing split](https://root-forum.cern.ch/t/tmvamulticlass-specifying-training-testing-split/51954)

<div class="topic-metadata">

**Author:** [@smitmatt](https://root-forum.cern.ch/u/smitmatt)\
**Replies:** 6\
**Last updated:** [October 17, 2022, 9:28pm UTC](https://root-forum.cern.ch/t/tmvamulticlass-specifying-training-testing-split/51954 "2022-10-17T21:28:38Z")

</div>

Hello, I would like to change the percentage of data used in training multiclass BDT’s, but cannot find documentation of the correct string to use. I see usually the following is used: PrepareTrainingAndTestTree( MyCu…

---

## [MLP annconvergence test](https://root-forum.cern.ch/t/mlp-annconvergence-test/51869)

<div class="topic-metadata">

**Author:** [@iker](https://root-forum.cern.ch/u/iker)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 8:49am UTC](https://root-forum.cern.ch/t/mlp-annconvergence-test/51869 "2022-10-07T08:49:33Z")

</div>

Hi, I’m a beginner in TMVA MLP training and have a question. When I try to get output of MLP annconvergence test, Test and Train set convergence estimator have different normalization, while what I expecting(or learned…

---

## [What is minimize target parameter in TMVA::DNN when my target variable is an array?](https://root-forum.cern.ch/t/what-is-minimize-target-parameter-in-tmva-dnn-when-my-target-variable-is-an-array/51755)

<div class="topic-metadata">

**Author:** [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Replies:** 5\
**Last updated:** [October 4, 2022, 9:06am UTC](https://root-forum.cern.ch/t/what-is-minimize-target-parameter-in-tmva-dnn-when-my-target-variable-is-an-array/51755 "2022-10-04T09:06:02Z")

</div>

Hello, I want to reconstruct the direction of a particle, so I store the vx,vy,vz into an array called “direction”. I use the code “dataloader-\>AddTarget( “direction” )” to add the variable and use “CROSSENTROPY” as the…

---

## ['std::bad\_alloc' after using TMVA::Factory ::BookMethod](https://root-forum.cern.ch/t/std-bad-alloc-after-using-tmva-factory-bookmethod/25618)

<div class="topic-metadata">

**Author:** [@willemv](https://root-forum.cern.ch/u/willemv)\
**Replies:** 9\
**Last updated:** [September 23, 2022, 9:44am UTC](https://root-forum.cern.ch/t/std-bad-alloc-after-using-tmva-factory-bookmethod/25618 "2022-09-23T09:44:20Z")

</div>

I am trying to use TMVA for the first time, hoping to train a BDT discriminator. At the moment I was trying to train a simple discriminator using 2 variables, and to add signal and background training and test events "by…

---

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

<div class="topic-metadata">

**Author:** [@ymahmoud](https://root-forum.cern.ch/u/ymahmoud)\
**Replies:** 2\
**Last updated:** [September 19, 2022, 5:11pm UTC](https://root-forum.cern.ch/t/tmva-run-error/51615 "2022-09-19T17:11:04Z")

</div>

I get an error every time I run TMVA through for example root -l TMVAClassification.C() I haven’t changed anything in the files I am just running thee examples in the root/tutorial/tmva/ This is the error I get Proces…

---

## [Extracting ROC curve from a file and plotting it on a graph in root](https://root-forum.cern.ch/t/extracting-roc-curve-from-a-file-and-plotting-it-on-a-graph-in-root/51501)

<div class="topic-metadata">

**Author:** [@Ema22](https://root-forum.cern.ch/u/Ema22)\
**Replies:** 4\
**Last updated:** [September 8, 2022, 6:28pm UTC](https://root-forum.cern.ch/t/extracting-roc-curve-from-a-file-and-plotting-it-on-a-graph-in-root/51501 "2022-09-08T18:28:35Z")

</div>

Hi, I’m trying to draw multiple ROC curves on one canvas in root. To be able to do that, first I need to extract ROC curves from the files. So far I tried the following code which I found: // Open .root file TFile \*f1…

---

## [Spectator variables not define in AddVariable](https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421)

<div class="topic-metadata">

**Author:** [@chanchal](https://root-forum.cern.ch/u/chanchal)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 7:59am UTC](https://root-forum.cern.ch/t/spectator-variables-not-define-in-addvariable/51421 "2022-09-02T07:59:29Z")

</div>

Dear Expert, I want to add a few spectator variables but don’t want to use them for classifications i.e. can not add as an input variable (can not define in AddVariable). Only wants to have them in the output file for …

---

## [The value of energy regression by DNN method is negative](https://root-forum.cern.ch/t/the-value-of-energy-regression-by-dnn-method-is-negative/51400)

<div class="topic-metadata">

**Author:** [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Replies:** 5\
**Last updated:** [September 1, 2022, 6:06am UTC](https://root-forum.cern.ch/t/the-value-of-energy-regression-by-dnn-method-is-negative/51400 "2022-09-01T06:06:08Z")

</div>

I use DNN method to reconstruct gamma energy, the energy range of the training set is 20-50MeV, but the energy predictions are negative as shown below. However, the activation function of the output layer of my neural ne…

---

## [TMVA.CrossValidation crashes on destructor (PyROOT)](https://root-forum.cern.ch/t/tmva-crossvalidation-crashes-on-destructor-pyroot/51195)

<div class="topic-metadata">

**Author:** [@tpajero](https://root-forum.cern.ch/u/tpajero)\
**Replies:** 9\
**Last updated:** [August 29, 2022, 5:17pm UTC](https://root-forum.cern.ch/t/tmva-crossvalidation-crashes-on-destructor-pyroot/51195 "2022-08-29T17:17:25Z")

</div>

I get a segmentation fault after performing a TMVA classification with CrossValidation, i.e. \*\*\* Error in \`python3': double free or corruption (out): 0x0000000007d1fc10 \*\*\* which seems related to memory deallocation in…

---

## [What is the difference between MVA and TMVA?](https://root-forum.cern.ch/t/what-is-the-difference-between-mva-and-tmva/51099)

<div class="topic-metadata">

**Author:** [@realTay\_John](https://root-forum.cern.ch/u/realTay_John)\
**Replies:** 1\
**Last updated:** [August 8, 2022, 10:34am UTC](https://root-forum.cern.ch/t/what-is-the-difference-between-mva-and-tmva/51099 "2022-08-08T10:34:43Z")

</div>

Dear experts, Recently, I have been learning TMVA Method to train my dataset. And I learn about MVA too which is Multivariate Data Analysis. But I can not figure out the difference between them. Just a indicate is eno…

---

## [Different results when training TMVAMulticlass with same input events](https://root-forum.cern.ch/t/different-results-when-training-tmvamulticlass-with-same-input-events/50946)

<div class="topic-metadata">

**Author:** [@evalient](https://root-forum.cern.ch/u/evalient)\
**Replies:** 3\
**Last updated:** [August 8, 2022, 9:41am UTC](https://root-forum.cern.ch/t/different-results-when-training-tmvamulticlass-with-same-input-events/50946 "2022-08-08T09:41:24Z")

</div>

Hi everyone! I’m training a Multiclass classifier with TMVAMulticlass and obtaining slightly different results when using the same input events but selected from different files (with exactly the same selection applied)…

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

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