# TMVA

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

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

---

## [Continueous vs binned variables as control variables in TMVA](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324)

<div class="topic-metadata">

**Author:** [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Replies:** 3\
**Last updated:** [June 16, 2021, 5:22pm UTC](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324 "2021-06-16T17:22:58Z")

</div>

Dear Experts, I am working on particle identification using 1/beta. In theory, it is sqrt(m^2 + p^2)/p. Comparing the measured value with different values under different mass assumptions, one can find out the particle …

---

## [TMVA crashes after rectangular cut optimization with cross-validation](https://root-forum.cern.ch/t/tmva-crashes-after-rectangular-cut-optimization-with-cross-validation/44202)

<div class="topic-metadata">

**Author:** [@mwilkins](https://root-forum.cern.ch/u/mwilkins)\
**Replies:** 6\
**Last updated:** [June 7, 2021, 2:14pm UTC](https://root-forum.cern.ch/t/tmva-crashes-after-rectangular-cut-optimization-with-cross-validation/44202 "2021-06-07T14:14:27Z")

</div>

TMVA crashes with a segmentation violation after doing a rectangular cut optimization with cross-validation in 6.22/06. No such crash occurs for an RCO without cross-validation or for a BDT with cross-validation. It appe…

---

## [TMVA Factory methods not recognized](https://root-forum.cern.ch/t/tmva-factory-methods-not-recognized/45219)

<div class="topic-metadata">

**Author:** [@annacostelle](https://root-forum.cern.ch/u/annacostelle)\
**Replies:** 2\
**Last updated:** [June 3, 2021, 3:03pm UTC](https://root-forum.cern.ch/t/tmva-factory-methods-not-recognized/45219 "2021-06-03T15:03:49Z")

</div>

These are the commands that I am using to register my signal and background trees with a TMVA factory: TTree \* bkg = (TTree\*)f1-\>Get(“tree”); TTree \* sig = (TTree\*)f2-\>Get(“tree”); TFile \* outputFile = new TFile(“outp…

---

## [Expression weight could not be resolve to a valid formula](https://root-forum.cern.ch/t/expression-weight-could-not-be-resolve-to-a-valid-formula/45113)

<div class="topic-metadata">

**Author:** [@anwar](https://root-forum.cern.ch/u/anwar)\
**Replies:** 9\
**Last updated:** [May 28, 2021, 7:06pm UTC](https://root-forum.cern.ch/t/expression-weight-could-not-be-resolve-to-a-valid-formula/45113 "2021-05-28T19:06:21Z")

</div>

Hello TMVA Experts im using TMVAClassification.C Script. I was looking at @moneta github, tmva-tutorial/notebooks at master · lmoneta/tmva-tutorial · GitHub and from there i modified the script void TMVAClassification…

---

## [Rarity distribution for BDT is non-uniform](https://root-forum.cern.ch/t/rarity-distribution-for-bdt-is-non-uniform/45070)

<div class="topic-metadata">

**Author:** [@JuanLeite](https://root-forum.cern.ch/u/JuanLeite)\
**Replies:** 3\
**Last updated:** [May 28, 2021, 6:11pm UTC](https://root-forum.cern.ch/t/rarity-distribution-for-bdt-is-non-uniform/45070 "2021-05-28T18:11:38Z")

</div>

Hi, I’m training a BDT Classifier to reject background events of my data sample to increase the purity. I was reading the TMVA Users Guide and in section 3.1.13 it says: Another useful aspect of the probability integr…

---

## [TMVAGui in root-notebook](https://root-forum.cern.ch/t/tmvagui-in-root-notebook/45077)

<div class="topic-metadata">

**Author:** [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Replies:** 3\
**Last updated:** [May 26, 2021, 3:20pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-notebook/45077 "2021-05-26T15:20:02Z")

</div>

Dear experts, I tried to visualize the train output via TMVAGui function. I am wondering whether I can use it on SWAN. I start a ROOT-C++ session and tried this command. Nothing will pop out. Is this expected? Best reg…

---

## [Plotting bdt output over a input variable](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031)

<div class="topic-metadata">

**Author:** [@rithishbarath](https://root-forum.cern.ch/u/rithishbarath)\
**Replies:** 3\
**Last updated:** [May 25, 2021, 2:09pm UTC](https://root-forum.cern.ch/t/plotting-bdt-output-over-a-input-variable/45031 "2021-05-25T14:09:58Z")

</div>

How to place a cut on the BDT output \> 0 and calculate the amount of background removed and signal removed from a specific input variable’s distribution? How to do this using TMVAAPPLICATION.C? How to plot a variable d…

---

## [TMVA Error TMVAClassification.C](https://root-forum.cern.ch/t/tmva-error-tmvaclassification-c/44980)

<div class="topic-metadata">

**Author:** [@anwar](https://root-forum.cern.ch/u/anwar)\
**Replies:** 3\
**Last updated:** [May 25, 2021, 9:04am UTC](https://root-forum.cern.ch/t/tmva-error-tmvaclassification-c/44980 "2021-05-25T09:04:30Z")

</div>

Hello; i modify TMVAClassification.C script for signal and bkgrd files. int TMVAClassification( TString myMethodList = "" ) { // The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc …

---

## [Separate signal and background in real data from output of TMVA reader classifier](https://root-forum.cern.ch/t/separate-signal-and-background-in-real-data-from-output-of-tmva-reader-classifier/45015)

<div class="topic-metadata">

**Author:** [@nayakr](https://root-forum.cern.ch/u/nayakr)\
**Replies:** 1\
**Last updated:** [May 21, 2021, 1:16pm UTC](https://root-forum.cern.ch/t/separate-signal-and-background-in-real-data-from-output-of-tmva-reader-classifier/45015 "2021-05-21T13:16:45Z")

</div>

Hello Experts, I trained my monte carlo data with signal and background and then applied the weight.xml file to real experimental data. Please find the attached output from tmva reader output for MLP classifier. My prob…

---

## [Interface of EvaluateMVA](https://root-forum.cern.ch/t/interface-of-evaluatemva/44950)

<div class="topic-metadata">

**Author:** [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Replies:** 2\
**Last updated:** [May 19, 2021, 1:53pm UTC](https://root-forum.cern.ch/t/interface-of-evaluatemva/44950 "2021-05-19T13:53:29Z")

</div>

Dear experts, After searching a bit, I could not find similar post for this question. I would like to post my question here. I am currently working on the TMVA applications. Consulting the example code TMVAClassificati…

---

## [Extract information from TMVA output file (TMVA.root by default)](https://root-forum.cern.ch/t/extract-information-from-tmva-output-file-tmva-root-by-default/44836)

<div class="topic-metadata">

**Author:** [@kgizdov](https://root-forum.cern.ch/u/kgizdov)\
**Replies:** 2\
**Last updated:** [May 19, 2021, 12:37pm UTC](https://root-forum.cern.ch/t/extract-information-from-tmva-output-file-tmva-root-by-default/44836 "2021-05-19T12:37:53Z")

</div>

Hi, So I’m trying to reproduce some stuff on old TMVA training. I’ve got the TMVA output file, TMVA.root, but it seems there are no ready made functions to do just that (or I can’t seem to grasp the TMVA API). I’ve ope…

---

## [Convert XGBoost BDT regression model to TMVA](https://root-forum.cern.ch/t/convert-xgboost-bdt-regression-model-to-tmva/39251)

<div class="topic-metadata">

**Author:** [@Stepan\_Zakharov](https://root-forum.cern.ch/u/Stepan_Zakharov)\
**Replies:** 22\
**Last updated:** [May 17, 2021, 9:22am UTC](https://root-forum.cern.ch/t/convert-xgboost-bdt-regression-model-to-tmva/39251 "2021-05-17T09:22:19Z")

</div>

Hi, all! I’m looking for a way of conversion of the regression model trained with XGBoost into TMVA format. Before that, I tried to use this code \[1\], but there was a strange bug. The distribution of the regression out…

---

## [Handling negative weight events with BDTG](https://root-forum.cern.ch/t/handling-negative-weight-events-with-bdtg/44373)

<div class="topic-metadata">

**Author:** [@shankha\_banerjee](https://root-forum.cern.ch/u/shankha_banerjee)\
**Replies:** 13\
**Last updated:** [May 13, 2021, 10:44am UTC](https://root-forum.cern.ch/t/handling-negative-weight-events-with-bdtg/44373 "2021-05-13T10:44:38Z")

</div>

Hi, I am dealing with an effective field theory scenario where my signal (the interference term) has almost equal proportion of negative and positive weight events. To try and train the samples, I was following this sug…

---

## [Training TMVA with different signal/background variable names](https://root-forum.cern.ch/t/training-tmva-with-different-signal-background-variable-names/44656)

<div class="topic-metadata">

**Author:** [@jruizvid](https://root-forum.cern.ch/u/jruizvid)\
**Replies:** 3\
**Last updated:** [May 4, 2021, 12:48pm UTC](https://root-forum.cern.ch/t/training-tmva-with-different-signal-background-variable-names/44656 "2021-05-04T12:48:47Z")

</div>

Is it possible to train a classifier using two tuples (signal/background, MC/data) that have different variable names? For example, some variables are called PIDx in background, and PIDx\_corr in the signal tree. I guess…

---

## [Usage of Category method](https://root-forum.cern.ch/t/usage-of-category-method/44591)

<div class="topic-metadata">

**Author:** [@Andrea\_Alici](https://root-forum.cern.ch/u/Andrea_Alici)\
**Replies:** 8\
**Last updated:** [May 3, 2021, 9:38am UTC](https://root-forum.cern.ch/t/usage-of-category-method/44591 "2021-05-03T09:38:40Z")

</div>

Dear TMVA experts, I’m trying to run the BDT classification with 12 variables. In a subsample of events, 3 out of the 12 variables are missing and are assigned a default value = -9999 no matters if it is a signal or a b…

---

## [Model a PDF (probability density) from data](https://root-forum.cern.ch/t/model-a-pdf-probability-density-from-data/44095)

<div class="topic-metadata">

**Author:** [@ynikitenko](https://root-forum.cern.ch/u/ynikitenko)\
**Replies:** 7\
**Last updated:** [April 26, 2021, 9:44am UTC](https://root-forum.cern.ch/t/model-a-pdf-probability-density-from-data/44095 "2021-04-26T09:44:07Z")

</div>

I’ve read TMVA documentation, slides and looked at the tutorials, but couldn’t find an example how to model a pdf. I have background (mostly uniform in the detector, but with strange regions that I don’t want to model p…

---

## [TMVAGui mislabels multiclass ROC curves](https://root-forum.cern.ch/t/tmvagui-mislabels-multiclass-roc-curves/44434)

<div class="topic-metadata">

**Author:** [@mwilkins](https://root-forum.cern.ch/u/mwilkins)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 10:35am UTC](https://root-forum.cern.ch/t/tmvagui-mislabels-multiclass-roc-curves/44434 "2021-04-16T10:35:15Z")

</div>

ROC curves plotted using TMVAGui are labeled as the wrong classes. This results in the user attributing an MVA’s behavior to the wrong class and means that any analysis that relied on these curves may have had undiagnose…

---

## [TMVA cut efficiency plot seems wrong](https://root-forum.cern.ch/t/tmva-cut-efficiency-plot-seems-wrong/44418)

<div class="topic-metadata">

**Author:** [@huiling110](https://root-forum.cern.ch/u/huiling110)\
**Replies:** 4\
**Last updated:** [April 16, 2021, 10:25am UTC](https://root-forum.cern.ch/t/tmva-cut-efficiency-plot-seems-wrong/44418 "2021-04-16T10:25:18Z")

</div>

Dear expert， While using TMVA Gui to get the result of the BDT training, the significance line in the cut efficiency plot seems very strange(flat ). but the text in the left lower corner seems correct. Could any one ple…

---

## [Method to change the input variable range in a root file](https://root-forum.cern.ch/t/method-to-change-the-input-variable-range-in-a-root-file/44419)

<div class="topic-metadata">

**Author:** [@rithishbarath](https://root-forum.cern.ch/u/rithishbarath)\
**Replies:** 6\
**Last updated:** [April 15, 2021, 1:47pm UTC](https://root-forum.cern.ch/t/method-to-change-the-input-variable-range-in-a-root-file/44419 "2021-04-15T13:47:34Z")

</div>

Dear people, I wish to change the range of values in x axis of an input variable . For example if you can see the image the range is from -40 to 40 . I wish to zoom in the range and plot from -1 to 1 . Should i modify t…

---

## [Cannot evaluate multiclass BDT response with bagging](https://root-forum.cern.ch/t/cannot-evaluate-multiclass-bdt-response-with-bagging/44241)

<div class="topic-metadata">

**Author:** [@mwilkins](https://root-forum.cern.ch/u/mwilkins)\
**Replies:** 4\
**Last updated:** [April 13, 2021, 12:38pm UTC](https://root-forum.cern.ch/t/cannot-evaluate-multiclass-bdt-response-with-bagging/44241 "2021-04-13T12:38:03Z")

</div>

If I do a multiclass analysis with bagging enabled, the BDT response histogram has all entries assigned to the overflow bin. Effectively, this means I cannot evaluate my BDT response in a multiclass analysis with bagging…

---

## [GetSeparation error in evaluation stage of training](https://root-forum.cern.ch/t/getseparation-error-in-evaluation-stage-of-training/43884)

<div class="topic-metadata">

**Author:** [@gglawley](https://root-forum.cern.ch/u/gglawley)\
**Replies:** 4\
**Last updated:** [March 15, 2021, 10:54pm UTC](https://root-forum.cern.ch/t/getseparation-error-in-evaluation-stage-of-training/43884 "2021-03-15T22:54:31Z")

</div>

Hello, I’m training a BDT on some large nTuples and I have a stubborn error in the EvaluateAllMethods stage. It reads: \<GetSeparation\> signal and background histograms have different or invalid dimensions and I suspec…

---

## [TMVA compute Long64\_t](https://root-forum.cern.ch/t/tmva-compute-long64-t/43801)

<div class="topic-metadata">

**Author:** [@FLouyet](https://root-forum.cern.ch/u/FLouyet)\
**Replies:** 4\
**Last updated:** [March 5, 2021, 7:50am UTC](https://root-forum.cern.ch/t/tmva-compute-long64-t/43801 "2021-03-05T07:50:37Z")

</div>

Hello everyone. I have a problem to compute my model. The .csv file I’m using has several types of data including Long64\_t. To use the model the “.Compute” function must have float. How can I convert my long to float …

---

## [Getting a single ROC curve for multiple BDT trees](https://root-forum.cern.ch/t/getting-a-single-roc-curve-for-multiple-bdt-trees/43654)

<div class="topic-metadata">

**Author:** [@rithishbarath](https://root-forum.cern.ch/u/rithishbarath)\
**Replies:** 8\
**Last updated:** [March 3, 2021, 3:31pm UTC](https://root-forum.cern.ch/t/getting-a-single-roc-curve-for-multiple-bdt-trees/43654 "2021-03-03T15:31:36Z")

</div>

Dear members, I would like to get a single ROC curve which compares different number of trees . Look at the attached image for example. What modifications should i do in the TMVA CLASSIFICATION.C file to get this type …

---

## [How to train a BDT with ROOT::EnableImplicitMT() on LXPLUS](https://root-forum.cern.ch/t/how-to-train-a-bdt-with-root-enableimplicitmt-on-lxplus/43651)

<div class="topic-metadata">

**Author:** [@oguloncel](https://root-forum.cern.ch/u/oguloncel)\
**Replies:** 4\
**Last updated:** [March 1, 2021, 3:29pm UTC](https://root-forum.cern.ch/t/how-to-train-a-bdt-with-root-enableimplicitmt-on-lxplus/43651 "2021-03-01T15:29:22Z")

</div>

Dear Experts, I have read that ROOT has the functionality to parallelise GradBoost BDT training in TMVA via using the ROOT::EnableImplicitMT(). I am trying to do this on LXPLUS (also tried it on HTCondor with setting R…

---

## [Setting ADAM optimizer parameters](https://root-forum.cern.ch/t/setting-adam-optimizer-parameters/43450)

<div class="topic-metadata">

**Author:** [@Lucas-NL](https://root-forum.cern.ch/u/Lucas-NL)\
**Replies:** 3\
**Last updated:** [March 1, 2021, 3:25pm UTC](https://root-forum.cern.ch/t/setting-adam-optimizer-parameters/43450 "2021-03-01T15:25:55Z")

</div>

Dear all, I started working with TMVA’s DNN (DL) recently and I would like to compare some results my group had previously using sklearn library in python. For this, I would like to set as many parameters as possible th…

---

## [CNN DataLoader::AddVariablesArray() for images with multi channels, order of input array](https://root-forum.cern.ch/t/cnn-dataloader-addvariablesarray-for-images-with-multi-channels-order-of-input-array/43709)

<div class="topic-metadata">

**Author:** [@Xinran\_Li](https://root-forum.cern.ch/u/Xinran_Li)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 9:00am UTC](https://root-forum.cern.ch/t/cnn-dataloader-addvariablesarray-for-images-with-multi-channels-order-of-input-array/43709 "2021-03-01T09:00:14Z")

</div>

Hi everyone, I am trying to use the CNN in TMVA to analys pixelized electron track images. The images are 3D voxels of the track, with high resolution in XY and coarse resolution in Z. So I am treating the Z direction …

---

## [Inconsistency between EvaluateRegression and TMVAReg.root output file](https://root-forum.cern.ch/t/inconsistency-between-evaluateregression-and-tmvareg-root-output-file/43659)

<div class="topic-metadata">

**Author:** [@testa](https://root-forum.cern.ch/u/testa)\
**Replies:** 3\
**Last updated:** [February 22, 2021, 7:23pm UTC](https://root-forum.cern.ch/t/inconsistency-between-evaluateregression-and-tmvareg-root-output-file/43659 "2021-02-22T19:23:39Z")

</div>

Dear Experts, I’m reading a xml file for a regression into an analysis code. The values of the target I get from reader-\>EvaluateRegression( “BDTG” ))\[0\]; are not the same, in the same event, as those stored in the …

---

## [Different branches in signal and background trees for TMVA](https://root-forum.cern.ch/t/different-branches-in-signal-and-background-trees-for-tmva/41472)

<div class="topic-metadata">

**Author:** [@testa](https://root-forum.cern.ch/u/testa)\
**Replies:** 3\
**Last updated:** [February 19, 2021, 7:50am UTC](https://root-forum.cern.ch/t/different-branches-in-signal-and-background-trees-for-tmva/41472 "2021-02-19T07:50:12Z")

</div>

Dear experts, in my signal tree I’ve additional branches wrt the background tree, and I want to use them to apply a cut on the signal events using TCut mycuts = “tree\_FJ\_ishs == 1”, while for the background selectio…

---

## [RegressionKeras example](https://root-forum.cern.ch/t/regressionkeras-example/43466)

<div class="topic-metadata">

**Author:** [@testa](https://root-forum.cern.ch/u/testa)\
**Replies:** 7\
**Last updated:** [February 17, 2021, 6:30pm UTC](https://root-forum.cern.ch/t/regressionkeras-example/43466 "2021-02-17T18:30:06Z")

</div>

Dear experts, I would like to run this example: https://root.cern.ch/doc/v622/RegressionKeras\_8py\_source.html On lxplus I did: source /cvmfs/sft.cern.ch/lcg/views/LCG\_98python3/x86\_64-centos7-gcc8-opt/setup.sh \[mtes…

---

## [TMVA overtraining check and spectator variables](https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457)

<div class="topic-metadata">

**Author:** [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Replies:** 2\
**Last updated:** [February 12, 2021, 4:12pm UTC](https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457 "2021-02-12T16:12:36Z")

</div>

Dear experts I am trying to train a classifier to recognize signals. I generated the plot for the TMVA overtraining check. It looks like below: I am wondering is this due to my bad configuration or low statistics (sm…

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

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