# TMVA

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

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

---

## [PyRoot PyInitialize causes Segmentation Fault](https://root-forum.cern.ch/t/pyroot-pyinitialize-causes-segmentation-fault/60528)

<div class="topic-metadata">

**Author:** [@tstarynski](https://root-forum.cern.ch/u/tstarynski)\
**Replies:** 9\
**Last updated:** [August 21, 2024, 6:13pm UTC](https://root-forum.cern.ch/t/pyroot-pyinitialize-causes-segmentation-fault/60528 "2024-08-21T18:13:35Z")

</div>

Hello, I have been having an issue using ROOT.TMVA.PyMethodBase.PyInitialize() in a program. My program ends in a Segmentation Fault after successfully completing the rest of the program. For example, for the following …

---

## [RBDT compilation issue](https://root-forum.cern.ch/t/rbdt-compilation-issue/60498)

<div class="topic-metadata">

**Author:** [@aaarora](https://root-forum.cern.ch/u/aaarora)\
**Replies:** 2\
**Last updated:** [August 14, 2024, 11:31pm UTC](https://root-forum.cern.ch/t/rbdt-compilation-issue/60498 "2024-08-14T23:31:45Z")

</div>

Hello, I am trying to compile a small macro with RBDT but it fails at the linking step. A minimal example is #include "TMVA/RBDT.hxx" int main(){ TMVA::Experimental::RBDT bdt("BDT", "BDT.root"); return 0; } g…

---

## [Question about TMVA::DataLoader::AddVariable()](https://root-forum.cern.ch/t/question-about-tmva-addvariable/60455)

<div class="topic-metadata">

**Author:** [@TField](https://root-forum.cern.ch/u/TField)\
**Replies:** 3\
**Last updated:** [August 9, 2024, 12:26pm UTC](https://root-forum.cern.ch/t/question-about-tmva-addvariable/60455 "2024-08-09T12:26:00Z")

</div>

Can TMVA::DataLoader::AddVariable() method deal with more sophiscated input variable rather than, for exmple, dataloader-\>AddVariable(“myvar1 := var1+var2”, ‘F’); For example, //////////////////////////////////////////…

---

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

<div class="topic-metadata">

**Author:** [@TField](https://root-forum.cern.ch/u/TField)\
**Replies:** 3\
**Last updated:** [August 8, 2024, 9:39am UTC](https://root-forum.cern.ch/t/question-about-root-tmva/60439 "2024-08-08T09:39:04Z")

</div>

For a classifier, I want to put some variables in and train them first , then put some other variables and train, in TMVA ,is there any methods to help to calculate the “two-step” training signal and background effieicen…

---

## [Facing error when using RDF to deal with TMVA .xml file via PyROOT](https://root-forum.cern.ch/t/facing-error-when-using-rdf-to-deal-with-tmva-xml-file-via-pyroot/60298)

<div class="topic-metadata">

**Author:** [@Linnuo](https://root-forum.cern.ch/u/Linnuo)\
**Replies:** 8\
**Last updated:** [August 7, 2024, 12:57pm UTC](https://root-forum.cern.ch/t/facing-error-when-using-rdf-to-deal-with-tmva-xml-file-via-pyroot/60298 "2024-08-07T12:57:03Z")

</div>

Dear experts, When I try to use RDF in PyROOT to deal with TMVA .xml file, I face a strange error that it can not find computeModel from ROOT. I find other answer in the forum using almost the same script as mine do not…

---

## [How to extract Cut Value?](https://root-forum.cern.ch/t/how-to-extract-cut-value/27653)

<div class="topic-metadata">

**Author:** [@maffe](https://root-forum.cern.ch/u/maffe)\
**Replies:** 9\
**Last updated:** [July 28, 2024, 5:08am UTC](https://root-forum.cern.ch/t/how-to-extract-cut-value/27653 "2024-07-28T05:08:25Z")

</div>

Hi ! I’m doing some TMVA Boosted Decision Tree exercise and I’d like to save the Cut Value as a variable ? Basically the 0.019 variable. I couldn’t find the method to call. — Factory : ----------------…

---

## [How to get tree branch variables for a specific entry based on the thresholds from the ROC curve?](https://root-forum.cern.ch/t/how-to-get-tree-branch-variables-for-a-specific-entry-based-on-the-thresholds-from-the-roc-curve/59663)

<div class="topic-metadata">

**Author:** [@Jackhammer0102](https://root-forum.cern.ch/u/Jackhammer0102)\
**Replies:** 5\
**Last updated:** [July 22, 2024, 4:08pm UTC](https://root-forum.cern.ch/t/how-to-get-tree-branch-variables-for-a-specific-entry-based-on-the-thresholds-from-the-roc-curve/59663 "2024-07-22T16:08:40Z")

</div>

Hi, ROOT experts, I have a script to make the ROC curve out of the TMVA output file by using the cuts: import numpy as np import ROOT from ROOT import TFile, TTree, TCanvas, TGraph, TPad, TLegend f = TFile.Open("facto…

---

## [SOFIE and RDataFrame](https://root-forum.cern.ch/t/sofie-and-rdataframe/60176)

<div class="topic-metadata">

**Author:** [@tstarynski](https://root-forum.cern.ch/u/tstarynski)\
**Replies:** 3\
**Last updated:** [July 12, 2024, 4:29pm UTC](https://root-forum.cern.ch/t/sofie-and-rdataframe/60176 "2024-07-12T16:29:15Z")

</div>

Hello, I am learning how to use SOFIE to create RDataFrames with a trained neural network that I have saved in an ONNX file. I have successfully generated a root file and .hxx file using SOFIE from this ONNX file but no…

---

## [TMVA BDT specific ranking unreliable](https://root-forum.cern.ch/t/tmva-bdt-specific-ranking-unreliable/60035)

<div class="topic-metadata">

**Author:** [@billmurray](https://root-forum.cern.ch/u/billmurray)\
**Replies:** 3\
**Last updated:** [June 28, 2024, 9:40pm UTC](https://root-forum.cern.ch/t/tmva-bdt-specific-ranking-unreliable/60035 "2024-06-28T21:40:27Z")

</div>

Dear TMVA, I have noticed very strange ranking numbers in a simple BDTG setup. As a test I tried a classification problem (signal & background) using two variables: the phi of the lepton (Events were required to have ==…

---

## [K-fold CV in TMVA::Experimental::RReader](https://root-forum.cern.ch/t/k-fold-cv-in-tmva-rreader/59779)

<div class="topic-metadata">

**Author:** [@anfeng](https://root-forum.cern.ch/u/anfeng)\
**Replies:** 3\
**Last updated:** [June 28, 2024, 3:00pm UTC](https://root-forum.cern.ch/t/k-fold-cv-in-tmva-rreader/59779 "2024-06-28T15:00:38Z")

</div>

Hi, I am using TMVA::Experimental::RReader with k-fold cross validation and datasets split by deterministic SplitExpr to apply MVA prediction using RDataFrame. However, I am getting wrong MVA responses, which are very c…

---

## [TMVA::SOFIE Operator type Constant](https://root-forum.cern.ch/t/tmva-sofie-operator-type-constant/59599)

<div class="topic-metadata">

**Author:** [@Pedro\_Silva](https://root-forum.cern.ch/u/Pedro_Silva)\
**Replies:** 8\
**Last updated:** [June 28, 2024, 2:47pm UTC](https://root-forum.cern.ch/t/tmva-sofie-operator-type-constant/59599 "2024-06-28T14:47:27Z")

</div>

Dear all, I’m having trouble importing a model using TMVA::SOFIE. The model was been trained with pytorch and I exported it to onnx following the recommendations found in the examples/forum. However when I try to pars…

---

## [\<WARNING\>: ANN too complicated: #events=60000 #synapses=114588](https://root-forum.cern.ch/t/warning-ann-too-complicated-events-60000-synapses-114588/59948)

<div class="topic-metadata">

**Author:** [@lgolino](https://root-forum.cern.ch/u/lgolino)\
**Replies:** 1\
**Last updated:** [June 26, 2024, 5:47pm UTC](https://root-forum.cern.ch/t/warning-ann-too-complicated-events-60000-synapses-114588/59948 "2024-06-26T17:47:30Z")

</div>

Just got this warning when trying to train an MLP with ROOT TMVA… Am I being silly or is this not a really small network? It’s estimating a training time of (0%, time left: 43 hrs : 35 mins) which is finite at least, but…

---

## [Native way to get correlation matrix of branches of a tree](https://root-forum.cern.ch/t/native-way-to-get-correlation-matrix-of-branches-of-a-tree/59467)

<div class="topic-metadata">

**Author:** [@gorsedh](https://root-forum.cern.ch/u/gorsedh)\
**Replies:** 5\
**Last updated:** [June 21, 2024, 4:41am UTC](https://root-forum.cern.ch/t/native-way-to-get-correlation-matrix-of-branches-of-a-tree/59467 "2024-06-21T04:41:46Z")

</div>

Hello, I was looking at some code for doing correlation matrices for different variables in a tree and i started wondering if there is a native way to do so. Something like tree-\>getCorrMatrix(“branch1&&branch2&&…”,“we…

---

## [TMVA RReader not multithread safe](https://root-forum.cern.ch/t/tmva-rreader-not-multithread-safe/59662)

<div class="topic-metadata">

**Author:** [@Jordy\_Degens](https://root-forum.cern.ch/u/Jordy_Degens)\
**Replies:** 1\
**Last updated:** [June 17, 2024, 12:21pm UTC](https://root-forum.cern.ch/t/tmva-rreader-not-multithread-safe/59662 "2024-06-17T12:21:59Z")

</div>

Hi, In our code we are using the RReader class to evaluate a TMVA BDT in an RDF analysis. We noticed however that when running on multiple cores, re-running the same code resulted in slightly different results. In short…

---

## [TMVA::Experimental::SOFIE::RModelParser\_ONNX not recognized in namespace](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657)

<div class="topic-metadata">

**Author:** [@tstarynski](https://root-forum.cern.ch/u/tstarynski)\
**Replies:** 3\
**Last updated:** [June 17, 2024, 10:29am UTC](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657 "2024-06-17T10:29:19Z")

</div>

I am trying to use TMVA::Experimental::SOFIE::RModelParser\_ONNX to load in ONNX files into a program. To learn how it works i tried running the TMVA\_SOFIE\_ONNX.C file from the TMVA tutorial documentation, but I keep gett…

---

## [Error in ClassificationKeras.py](https://root-forum.cern.ch/t/error-in-classificationkeras-py/59489)

<div class="topic-metadata">

**Author:** [@zjzhao1002](https://root-forum.cern.ch/u/zjzhao1002)\
**Replies:** 1\
**Last updated:** [May 28, 2024, 9:08am UTC](https://root-forum.cern.ch/t/error-in-classificationkeras-py/59489 "2024-05-28T09:08:16Z")

</div>

Hi experts, I tried to run the Keras example (ClassificationKeras.py) in the tutorial, but I always get an error: AttributeError: module ‘keras.\_tf\_keras.keras.backend’ has no attribute ‘set\_session’. Did you mean: ‘s…

---

## [Converting .bin format model to .xml or .root format](https://root-forum.cern.ch/t/converting-bin-format-model-to-xml-or-root-format/59345)

<div class="topic-metadata">

**Author:** [@setesami](https://root-forum.cern.ch/u/setesami)\
**Replies:** 4\
**Last updated:** [May 20, 2024, 4:38am UTC](https://root-forum.cern.ch/t/converting-bin-format-model-to-xml-or-root-format/59345 "2024-05-20T04:38:10Z")

</div>

Dear Experts, I have already trained models with xgboost package in binary format( .bin) and I want to convert it to root or xml format in order to be used to evaluate in TMVA. Is there any convertor or an example of ho…

---

## [Managing large data for tensorflow TMVA training](https://root-forum.cern.ch/t/managing-large-data-for-tensorflow-tmva-training/59374)

<div class="topic-metadata">

**Author:** [@lgolino](https://root-forum.cern.ch/u/lgolino)\
**Replies:** 1\
**Last updated:** [May 17, 2024, 8:56pm UTC](https://root-forum.cern.ch/t/managing-large-data-for-tensorflow-tmva-training/59374 "2024-05-17T20:56:44Z")

</div>

I am attempting to do some deep learning with some very low level variables from a detector and have some perhaps more general questions relating to the whole pipeline… So the detector has ~36000 channels. For a bunch o…

---

## [How to dump XGBoost model to cpp file](https://root-forum.cern.ch/t/how-to-dump-xgboost-model-to-cpp-file/59198)

<div class="topic-metadata">

**Author:** [@agarabag](https://root-forum.cern.ch/u/agarabag)\
**Replies:** 1\
**Last updated:** [May 3, 2024, 7:03am UTC](https://root-forum.cern.ch/t/how-to-dump-xgboost-model-to-cpp-file/59198 "2024-05-03T07:03:19Z")

</div>

I’d like to use the output of an xgboost BDT model in a code base without having to rely explicitly on xgboost or otherwise. Using a modified version of this script, xgb2cpp I am able to generate a cpp function which, to…

---

## [How to let TMVA & pytorch to use GPU?](https://root-forum.cern.ch/t/how-to-let-tmva-pytorch-to-use-gpu/59088)

<div class="topic-metadata">

**Author:** [@phoenixAspies](https://root-forum.cern.ch/u/phoenixAspies)\
**Replies:** 5\
**Last updated:** [April 24, 2024, 7:11pm UTC](https://root-forum.cern.ch/t/how-to-let-tmva-pytorch-to-use-gpu/59088 "2024-04-24T19:11:40Z")

</div>

Hi, my current working environment is ROOT 6.26.14, Python 3.8.19, Windows 10, Pytorch 2.2 I have decided to start my work based on the example code(“tutorials\\tmva\\pytorch\\RegressionPyTorch.py”) given in the tutorial. …

---

## [Using root files with vector\<float\> branches as input into TMVA-keras](https://root-forum.cern.ch/t/using-root-files-with-vector-float-branches-as-input-into-tmva-keras/42463)

<div class="topic-metadata">

**Author:** [@ktali](https://root-forum.cern.ch/u/ktali)\
**Replies:** 6\
**Last updated:** [April 9, 2024, 8:23am UTC](https://root-forum.cern.ch/t/using-root-files-with-vector-float-branches-as-input-into-tmva-keras/42463 "2024-04-09T08:23:08Z")

</div>

Hello experts, I hope you can help me pls :slight\_smile: I am using the basic TMVA script (https://root.cern/doc/master/ClassificationKeras\_8py.html) from the tutorial to test the NN training on my own root files. The …

---

## [Evaluating MVA within Root Data Frame](https://root-forum.cern.ch/t/evaluating-mva-within-root-data-frame/49238)

<div class="topic-metadata">

**Author:** [@ceballos](https://root-forum.cern.ch/u/ceballos)\
**Replies:** 4\
**Last updated:** [April 4, 2024, 7:32pm UTC](https://root-forum.cern.ch/t/evaluating-mva-within-root-data-frame/49238 "2024-04-04T19:32:27Z")

</div>

Hello, I’ve tried to find some information, but I couldn’t find any actual example. I am trying to evaluate a BDT output within RDF (it could be BDT or anything). I’ve already made the training and I have the xml files.…

---

## [ROOT compilation error with TStorage](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703)

<div class="topic-metadata">

**Author:** [@vega](https://root-forum.cern.ch/u/vega)\
**Replies:** 4\
**Last updated:** [March 26, 2024, 5:27am UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703 "2024-03-26T05:27:33Z")

</div>

Hello ROOT Team, Greetings. I am facing some issues with ROOT (latest-stable) in Ubuntu-20.04. Configuration using cmake issues warning for SetROOTVersion showing GIT\_DESCRIBE\_ALL is set with unexpected formats ‘heads…

---

## [Nan entries in the dataset](https://root-forum.cern.ch/t/nan-entries-in-the-dataset/39576)

<div class="topic-metadata">

**Author:** [@Saumyenk](https://root-forum.cern.ch/u/Saumyenk)\
**Replies:** 5\
**Last updated:** [March 20, 2024, 4:40pm UTC](https://root-forum.cern.ch/t/nan-entries-in-the-dataset/39576 "2024-03-20T16:40:24Z")

</div>

Hi, I was running the classification macro with my dataset that has ‘nan’ entries. And I got the error as in below: \<FATAL\> : How am I supposed to train a NaN or +-inf?! So, can’t a ‘nan’ value…

---

## [Issue in TMVA input variable distributions with ROOT v6.30](https://root-forum.cern.ch/t/issue-in-tmva-input-variable-distributions-with-root-v6-30/58102)

<div class="topic-metadata">

**Author:** [@tfulghes](https://root-forum.cern.ch/u/tfulghes)\
**Replies:** 3\
**Last updated:** [February 12, 2024, 8:34am UTC](https://root-forum.cern.ch/t/issue-in-tmva-input-variable-distributions-with-root-v6-30/58102 "2024-02-12T08:34:54Z")

</div>

Dear ROOTers, I am experiencing an issue with some input variable distributions when training some methods with the kFolding procedure using TMVA on lxplus EL9 and ROOT v6.30 (attached picture inputvariables\_el9.png). T…

---

## [BDT TMVA training correlation cut-off](https://root-forum.cern.ch/t/bdt-tmva-training-correlation-cut-off/57161)

<div class="topic-metadata">

**Author:** [@shreya14p](https://root-forum.cern.ch/u/shreya14p)\
**Replies:** 2\
**Last updated:** [February 8, 2024, 1:23pm UTC](https://root-forum.cern.ch/t/bdt-tmva-training-correlation-cut-off/57161 "2024-02-08T13:23:26Z")

</div>

When we train a BDT model using some variables, the TMVA output gives the correlation matrix. What should be the cut-off value of the percentage correlation below which the variable should be accepted in the training? Wh…

---

## [Example code for mass v significance using root files](https://root-forum.cern.ch/t/example-code-for-mass-v-significance-using-root-files/57947)

<div class="topic-metadata">

**Author:** [@sidra\_swalheen](https://root-forum.cern.ch/u/sidra_swalheen)\
**Replies:** 7\
**Last updated:** [January 25, 2024, 9:32am UTC](https://root-forum.cern.ch/t/example-code-for-mass-v-significance-using-root-files/57947 "2024-01-25T09:32:08Z")

</div>

Hi, Is there any example file to find mass v significance using root files? I want graph for different masses at different energies but unable to do that. I am using ROOT version: 6.26 on Ubuntu 20

---

## [Gradient Boost BDT: Decision or regression trees?](https://root-forum.cern.ch/t/gradient-boost-bdt-decision-or-regression-trees/57945)

<div class="topic-metadata">

**Author:** [@JanEric](https://root-forum.cern.ch/u/JanEric)\
**Replies:** 3\
**Last updated:** [January 24, 2024, 3:19pm UTC](https://root-forum.cern.ch/t/gradient-boost-bdt-decision-or-regression-trees/57945 "2024-01-24T15:19:41Z")

</div>

Hi, i am currently reading the TMVA User Guide and have a question regarding the gradient boosting of BDTs. In a gradient boosted BDT, are the individual trees that make up the final BDT actual decision trees or are th…

---

## [Energy loss for magnetic monopoles](https://root-forum.cern.ch/t/energy-loss-for-magnetic-monopoles/57930)

<div class="topic-metadata">

**Author:** [@sidra\_swalheen](https://root-forum.cern.ch/u/sidra_swalheen)\
**Replies:** 2\
**Last updated:** [January 23, 2024, 8:46am UTC](https://root-forum.cern.ch/t/energy-loss-for-magnetic-monopoles/57930 "2024-01-23T08:46:18Z")

</div>

I want root analysis for monopole production. Is there any specific variable that that indicate the presence of monopole i.e; energy loss, ionization, or expected multiplicity ?

---

## [Compute method problem with XGBoost-trained BDT in TMVA](https://root-forum.cern.ch/t/compute-method-problem-with-xgboost-trained-bdt-in-tmva/57901)

<div class="topic-metadata">

**Author:** [@ANDREA\_PARETI](https://root-forum.cern.ch/u/ANDREA_PARETI)\
**Replies:** 3\
**Last updated:** [January 22, 2024, 10:14am UTC](https://root-forum.cern.ch/t/compute-method-problem-with-xgboost-trained-bdt-in-tmva/57901 "2024-01-22T10:14:09Z")

</div>

Hello, I’m having problems with the model evaluation on a test set using the Compute(x) function of the ROOT.TMVA.Experimental.RBDT model. I’m strictly following the training at root.cern/doc/master/tmva102\_\_Testing\_8p…

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

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