# TMVA

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

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

---

## [Failed filling branch when applying the BDT result](https://root-forum.cern.ch/t/failed-filling-branch-when-applying-the-bdt-result/57919)

<div class="topic-metadata">

**Author:** [@Rbb\_Cui](https://root-forum.cern.ch/u/Rbb_Cui)\
**Replies:** 4\
**Last updated:** [January 21, 2024, 7:20pm UTC](https://root-forum.cern.ch/t/failed-filling-branch-when-applying-the-bdt-result/57919 "2024-01-21T19:20:33Z")

</div>

Hi, I am new to TMVA and ROOT. I am trying to use two separate BDTGs on my dataset, and I encounter the error shown in the screenshot when I run my evaluation script. Attached is my script Thanks!

---

## [Clearing fStorage and fHistAlias (from Results class) from Factory Training/Testing](https://root-forum.cern.ch/t/clearing-fstorage-and-fhistalias-from-results-class-from-factory-training-testing/37059)

<div class="topic-metadata">

**Author:** [@daniel-sunyou-li](https://root-forum.cern.ch/u/daniel-sunyou-li)\
**Replies:** 4\
**Last updated:** [January 18, 2024, 2:36pm UTC](https://root-forum.cern.ch/t/clearing-fstorage-and-fhistalias-from-results-class-from-factory-training-testing/37059 "2024-01-18T14:36:04Z")

</div>

I am using TMVA.Factory() to train/test/evaluate a DNN in Python. I was wondering how to clear the histograms stored in the associated Results object created by factory. More specifically, I get issues when iterating o…

---

## [Applying a trained ML model to unlabeled data](https://root-forum.cern.ch/t/applying-a-trained-ml-model-to-unlabeled-data/57804)

<div class="topic-metadata">

**Author:** [@mlouka](https://root-forum.cern.ch/u/mlouka)\
**Replies:** 1\
**Last updated:** [January 11, 2024, 2:01pm UTC](https://root-forum.cern.ch/t/applying-a-trained-ml-model-to-unlabeled-data/57804 "2024-01-11T14:01:53Z")

</div>

Hello all, I’m doing a binary classification between signal (new resonance) and background (SM) using MLP of the TMVA. I’m using already weighted TTree events for training the model. After doing the training, I apply t…

---

## [Transforming TTree with many variables into a 2D image to use as input for a CNN?](https://root-forum.cern.ch/t/transforming-ttree-with-many-variables-into-a-2d-image-to-use-as-input-for-a-cnn/56873)

<div class="topic-metadata">

**Author:** [@abayyari](https://root-forum.cern.ch/u/abayyari)\
**Replies:** 3\
**Last updated:** [January 9, 2024, 10:22am UTC](https://root-forum.cern.ch/t/transforming-ttree-with-many-variables-into-a-2d-image-to-use-as-input-for-a-cnn/56873 "2024-01-09T10:22:36Z")

</div>

I have a root file that has 360 variables in the TTree. Each variable outputs a 1 or 0 to represent an on or off pixel (18 variables for each row, with a total of 20 rows). Now I want to transform these into a 2D image t…

---

## [Split TrainTree and TestTree into Signal and Background Train/Test Trees?](https://root-forum.cern.ch/t/split-traintree-and-testtree-into-signal-and-background-train-test-trees/56932)

<div class="topic-metadata">

**Author:** [@abayyari](https://root-forum.cern.ch/u/abayyari)\
**Replies:** 3\
**Last updated:** [January 9, 2024, 10:13am UTC](https://root-forum.cern.ch/t/split-traintree-and-testtree-into-signal-and-background-train-test-trees/56932 "2024-01-09T10:13:09Z")

</div>

I have successfully trained a classification NN, which uses all my input data as 80:20 for Train:Test that’s been randomly selected from my input TTree. Now I want to apply a selection cut based on the response of my cla…

---

## [When TMVA comput loss,Some Eopch's loss is INF](https://root-forum.cern.ch/t/when-tmva-comput-loss-some-eopchs-loss-is-inf/57018)

<div class="topic-metadata">

**Author:** [@yhao](https://root-forum.cern.ch/u/yhao)\
**Replies:** 3\
**Last updated:** [November 17, 2023, 2:15pm UTC](https://root-forum.cern.ch/t/when-tmva-comput-loss-some-eopchs-loss-is-inf/57018 "2023-11-17T14:15:29Z")

</div>

Dear users, When I train a DNN model with TMVA in ROOT6.20,I found out some epoch’s Train Err and Val Err are inf.I don’t understand why this is the case Below are the parameters and output of the model Thanks a …

---

## [The prediction probability given by TMVA DNN is all 0](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014)

<div class="topic-metadata">

**Author:** [@yhao](https://root-forum.cern.ch/u/yhao)\
**Replies:** 3\
**Last updated:** [November 17, 2023, 1:13pm UTC](https://root-forum.cern.ch/t/the-prediction-probability-given-by-tmva-dnn-is-all-0/57014 "2023-11-17T13:13:12Z")

</div>

Dear tmva users, I have trained DNN model using TMVA with ROOT6.20version.The model can application normally with ROOT6.18. But when I run it with ROOT6.20,the output is all zeros! I am extremely perplexed as to why cha…

---

## [Issue with MVA and NaN Values](https://root-forum.cern.ch/t/issue-with-mva-and-nan-values/57038)

<div class="topic-metadata">

**Author:** [@asmaa.aboulhorma](https://root-forum.cern.ch/u/asmaa.aboulhorma)\
**Replies:** 5\
**Last updated:** [November 15, 2023, 9:54pm UTC](https://root-forum.cern.ch/t/issue-with-mva-and-nan-values/57038 "2023-11-15T21:54:26Z")

</div>

Hello everyone, I’m facing a problem with my code for limit calculations. I have a dataset with variables m, pt, eta, and phi, I’m applying some BDT scores from TMVA training. The issue I’m encountering is as follows: …

---

## [Compilation failed for a toy model of SOFIE](https://root-forum.cern.ch/t/compilation-failed-for-a-toy-model-of-sofie/57069)

<div class="topic-metadata">

**Author:** [@zhiyuanlcern](https://root-forum.cern.ch/u/zhiyuanlcern)\
**Replies:** 2\
**Last updated:** [November 14, 2023, 5:05pm UTC](https://root-forum.cern.ch/t/compilation-failed-for-a-toy-model-of-sofie/57069 "2023-11-14T17:05:24Z")

</div>

Deart Root Expert, I found SOFIE extremely helpful for my analysis and I was trying to integrate it into my analysis framework. However the compilation failed, and I managed to reproduce the error using some simplest to…

---

## [Min/Max weights values after a successful TMVA classifier training are all +-3.40282347e+38?](https://root-forum.cern.ch/t/min-max-weights-values-after-a-successful-tmva-classifier-training-are-all-3-40282347e-38/57052)

<div class="topic-metadata">

**Author:** [@abayyari](https://root-forum.cern.ch/u/abayyari)\
**Replies:** 3\
**Last updated:** [November 14, 2023, 3:45pm UTC](https://root-forum.cern.ch/t/min-max-weights-values-after-a-successful-tmva-classifier-training-are-all-3-40282347e-38/57052 "2023-11-14T15:45:07Z")

</div>

I’m using a CNN with PyKeras as a classifier to separate signal/background events, and I’m getting very good results after training based on my ROC curve and Training+Testing Response plot. However, when I look at the we…

---

## [EvaluateMulticlass output zero](https://root-forum.cern.ch/t/evaluatemulticlass-output-zero/56378)

<div class="topic-metadata">

**Author:** [@yhao](https://root-forum.cern.ch/u/yhao)\
**Replies:** 1\
**Last updated:** [September 18, 2023, 7:41am UTC](https://root-forum.cern.ch/t/evaluatemulticlass-output-zero/56378 "2023-09-18T07:41:33Z")

</div>

Dear tmva users, I have trained DNN model using TMVA with ROOT6.18 version.The model can application normally with ROOT6.18, reader-\>EvaluateMulticlass( “DNN\_CPU method” ) can output right result. But when I run it with…

---

## [Save TMVA output histos as root file](https://root-forum.cern.ch/t/save-tmva-output-histos-as-root-file/56748)

<div class="topic-metadata">

**Author:** [@falicante](https://root-forum.cern.ch/u/falicante)\
**Replies:** 1\
**Last updated:** [October 17, 2023, 6:26am UTC](https://root-forum.cern.ch/t/save-tmva-output-histos-as-root-file/56748 "2023-10-17T06:26:39Z")

</div>

Hello there, I was wondering if there is a simple way to save some TMVA output histograms as root files for further analysis. My particular scenario is: I have trained a BDT and I would like to save the (4a) Classifier…

---

## [A distribution as a variable in TMVA](https://root-forum.cern.ch/t/a-distribution-as-a-variable-in-tmva/56725)

<div class="topic-metadata">

**Author:** [@tomhhc](https://root-forum.cern.ch/u/tomhhc)\
**Replies:** 1\
**Last updated:** [October 15, 2023, 4:59pm UTC](https://root-forum.cern.ch/t/a-distribution-as-a-variable-in-tmva/56725 "2023-10-15T16:59:30Z")

</div>

Dear professors, Variables are usually a single number for each signal or background. I’m wondering if it’s possible to consider a distribution of some physics quantities as an individual variable in TMVA. For example, …

---

## [After a classifier is done training/testing, how do I apply a selection cut afterwards and save the selected events using the response of the classifier?](https://root-forum.cern.ch/t/after-a-classifier-is-done-training-testing-how-do-i-apply-a-selection-cut-afterwards-and-save-the-selected-events-using-the-response-of-the-classifier/56697)

<div class="topic-metadata">

**Author:** [@abayyari](https://root-forum.cern.ch/u/abayyari)\
**Replies:** 1\
**Last updated:** [October 12, 2023, 1:27pm UTC](https://root-forum.cern.ch/t/after-a-classifier-is-done-training-testing-how-do-i-apply-a-selection-cut-afterwards-and-save-the-selected-events-using-the-response-of-the-classifier/56697 "2023-10-12T13:27:30Z")

</div>

I’m currently running a mlp neural network. After the training is finished, I can plot the response to the classifier with the TMVAGUI, which shows the separation strength for the signal/background events in my root file…

---

## [XGBoost Multiclass Predictions Inconsistent Between ROOT/Python](https://root-forum.cern.ch/t/xgboost-multiclass-predictions-inconsistent-between-root-python/56586)

<div class="topic-metadata">

**Author:** [@Chandler\_K](https://root-forum.cern.ch/u/Chandler_K)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 1:47pm UTC](https://root-forum.cern.ch/t/xgboost-multiclass-predictions-inconsistent-between-root-python/56586 "2023-10-03T13:47:28Z")

</div>

I have trained an XGBClassifier() in Python. It is a multi-class classifier and is defined as: model = XGBClassifier( max\_depth=7, reg\_alpha=2, reg\_lambda=4, gamma=0.1, objective='multi:softprob', …

---

## [Difference between TMVA and Scikit-learn](https://root-forum.cern.ch/t/difference-between-tmva-and-scikit-learn/56492)

<div class="topic-metadata">

**Author:** [@orestiskonsta](https://root-forum.cern.ch/u/orestiskonsta)\
**Replies:** 2\
**Last updated:** [September 27, 2023, 12:33pm UTC](https://root-forum.cern.ch/t/difference-between-tmva-and-scikit-learn/56492 "2023-09-27T12:33:50Z")

</div>

Hello root developers, Is there any particular difference between the implementation of Adaptive Boosting of TMVA and that of scikit-learn? I am applying the same algorithm with the same parameters to the same dataset …

---

## [Removing the output name in tmva histogram](https://root-forum.cern.ch/t/removing-the-output-name-in-tmva-histogram/56461)

<div class="topic-metadata">

**Author:** [@Abdul](https://root-forum.cern.ch/u/Abdul)\
**Replies:** 2\
**Last updated:** [September 25, 2023, 2:34pm UTC](https://root-forum.cern.ch/t/removing-the-output-name-in-tmva-histogram/56461 "2023-09-25T14:34:45Z")

</div>

Hi, root team. I am using root for the TMVA to plot histograms. I use output file name in code as “TMVA.root” and it appears in the histograms in the bottom right corner. I want to remove it how can I remove this outputf…

---

## [Is it possible to get cuts from TMVA Rectangular Cuts method?](https://root-forum.cern.ch/t/is-it-possible-to-get-cuts-from-tmva-rectangular-cuts-method/26824)

<div class="topic-metadata">

**Author:** [@p73](https://root-forum.cern.ch/u/p73)\
**Replies:** 11\
**Last updated:** [September 25, 2023, 5:49am UTC](https://root-forum.cern.ch/t/is-it-possible-to-get-cuts-from-tmva-rectangular-cuts-method/26824 "2023-09-25T05:49:01Z")

</div>

I am using TMVA Rectangular Cuts method to differentiate between signal and background. My sample space is 2-dimensional ( eTotal and pTotal ). What if want to draw cuts (for some signal efficiency)? How do I get cuts’ …

---

## [Vector type in TMVAClassificationApplication](https://root-forum.cern.ch/t/vector-type-in-tmvaclassificationapplication/56413)

<div class="topic-metadata">

**Author:** [@shreya14p](https://root-forum.cern.ch/u/shreya14p)\
**Replies:** 8\
**Last updated:** [September 20, 2023, 12:11pm UTC](https://root-forum.cern.ch/t/vector-type-in-tmvaclassificationapplication/56413 "2023-09-20T12:11:25Z")

</div>

Hello dear ROOT forum, I have trouble with TMVA’s macro (TMVAClassificationApplication). My input ROOT file has variables in vector type. I am using std::vector\<float\> \*userVar0= nullptr; std::vector\<float\> \*userVar1=…

---

## [Incompatibility among tensorflow of lxplus with tensorflow macbook pro, colab notebook and SWAN](https://root-forum.cern.ch/t/incompatibility-among-tensorflow-of-lxplus-with-tensorflow-macbook-pro-colab-notebook-and-swan/56336)

<div class="topic-metadata">

**Author:** [@fernandoaugusto12](https://root-forum.cern.ch/u/fernandoaugusto12)\
**Replies:** 8\
**Last updated:** [September 19, 2023, 1:51pm UTC](https://root-forum.cern.ch/t/incompatibility-among-tensorflow-of-lxplus-with-tensorflow-macbook-pro-colab-notebook-and-swan/56336 "2023-09-19T13:51:21Z")

</div>

Hello everybody, I would like to request help from experts for the following problem: I use neural networks in VBF signal analysis, a Multilayer perceptron, which saves the model as follows: ##########################…

---

## [New version of Keras and conflict with TMVA!](https://root-forum.cern.ch/t/new-version-of-keras-and-conflict-with-tmva/40589)

<div class="topic-metadata">

**Author:** [@cxwx1](https://root-forum.cern.ch/u/cxwx1)\
**Replies:** 3\
**Last updated:** [September 6, 2023, 4:05am UTC](https://root-forum.cern.ch/t/new-version-of-keras-and-conflict-with-tmva/40589 "2023-09-06T04:05:58Z")

</div>

tensorflow 2.2.0 Keras 2.4.3 \[2.3.0 OK\] running tutorial tutorials/tmva/keras/RegressionKeras.py bugs ImportError: cannot import name 'tensorflow\_backend' from 'keras.backend' (/usr/local/lib/python3.8/site-packages…

---

## [I'm getting only a single value from the EvaluateMVA() method in the TMVAClassificationApplication.C macro](https://root-forum.cern.ch/t/im-getting-only-a-single-value-from-the-evaluatemva-method-in-the-tmvaclassificationapplication-c-macro/56112)

<div class="topic-metadata">

**Author:** [@Raktim\_Mukherjee](https://root-forum.cern.ch/u/Raktim_Mukherjee)\
**Replies:** 14\
**Last updated:** [September 4, 2023, 3:01pm UTC](https://root-forum.cern.ch/t/im-getting-only-a-single-value-from-the-evaluatemva-method-in-the-tmvaclassificationapplication-c-macro/56112 "2023-09-04T15:01:25Z")

</div>

I am performing ML tasks. I first trained and tested multiple configurations of BDTs using the TMVAClassification.C macro but when I’m trying to run my model using the TMVAClassificationApplication.C macro, I’m getting o…

---

## [Change Default Style of TMVA Plotting](https://root-forum.cern.ch/t/change-default-style-of-tmva-plotting/56029)

<div class="topic-metadata">

**Author:** [@ruimig](https://root-forum.cern.ch/u/ruimig)\
**Replies:** 3\
**Last updated:** [September 3, 2023, 5:40pm UTC](https://root-forum.cern.ch/t/change-default-style-of-tmva-plotting/56029 "2023-09-03T17:40:36Z")

</div>

Greetings ROOT Developers, I’m currently facing a challenge while trying to customize the appearance of TMVA’s plotted graphs. My environment consists of ‘’'ROOT version 6.26.00 on macOS 12.1. Specifically, I’m aiming t…

---

## [TMVA: More than 200 variables, will not calculate PCA!](https://root-forum.cern.ch/t/tmva-more-than-200-variables-will-not-calculate-pca/56078)

<div class="topic-metadata">

**Author:** [@zenith378](https://root-forum.cern.ch/u/zenith378)\
**Replies:** 3\
**Last updated:** [August 23, 2023, 1:16pm UTC](https://root-forum.cern.ch/t/tmva-more-than-200-variables-will-not-calculate-pca/56078 "2023-08-23T13:16:50Z")

</div>

Hello ROOT experts, I am currently working with TMVA for a regression analysis with a substantial number of variables. I’d like to perform a Principal Component Analysis (PCA) to account for potential correlations among…

---

## [Variables add via the DataLoader AddVariable() method are all zero](https://root-forum.cern.ch/t/variables-add-via-the-dataloader-addvariable-method-are-all-zero/55973)

<div class="topic-metadata">

**Author:** [@aoverton](https://root-forum.cern.ch/u/aoverton)\
**Replies:** 3\
**Last updated:** [August 23, 2023, 1:14pm UTC](https://root-forum.cern.ch/t/variables-add-via-the-dataloader-addvariable-method-are-all-zero/55973 "2023-08-23T13:14:51Z")

</div>

I’m attempting to use the TMVA class, but no matter what variables from the trees I add, it’s reading 0 for every event. The values are stored as doubles, which from what I’ve gathered can make a difference, but I’m not …

---

## [TMVA: \*\*\* Break \*\*\* floating point exception](https://root-forum.cern.ch/t/tmva-break-floating-point-exception/56019)

<div class="topic-metadata">

**Author:** [@zenith378](https://root-forum.cern.ch/u/zenith378)\
**Replies:** 5\
**Last updated:** [August 23, 2023, 12:15pm UTC](https://root-forum.cern.ch/t/tmva-break-floating-point-exception/56019 "2023-08-23T12:15:19Z")

</div>

Dear all, I am getting started with TMVA and I would like to use the library to perform a regression. I started with the example posted here and I modified just the data loading part, according to the this guide, impor…

---

## [SOFIE Inference in C++](https://root-forum.cern.ch/t/sofie-inference-in-c/56002)

<div class="topic-metadata">

**Author:** [@lmonsoni](https://root-forum.cern.ch/u/lmonsoni)\
**Replies:** 2\
**Last updated:** [August 23, 2023, 12:09pm UTC](https://root-forum.cern.ch/t/sofie-inference-in-c/56002 "2023-08-23T12:09:39Z")

</div>

Hi experts, I am trying to do a SOFIE Inference in c++ from Classification TMVA Keras Model. All work correctly but I introduce the line: std::vector y = s-\>infer(NN\_data.data()); And compile I see this error: /cvmfs…

---

## [EvaluateAllMethods fails when either the Train or the Test sample is less than 100](https://root-forum.cern.ch/t/evaluateallmethods-fails-when-either-the-train-or-the-test-sample-is-less-than-100/55834)

<div class="topic-metadata">

**Author:** [@lilina](https://root-forum.cern.ch/u/lilina)\
**Replies:** 2\
**Last updated:** [August 7, 2023, 12:15pm UTC](https://root-forum.cern.ch/t/evaluateallmethods-fails-when-either-the-train-or-the-test-sample-is-less-than-100/55834 "2023-08-07T12:15:40Z")

</div>

Hi I am doing a regression following the tutorial RegressionKeras.py. The data that I have contains less than 100 entries. When I run the code I get the following error after the training and test are done at the factor…

---

## [Inconsistencies with TMVA model evaluation in pyROOT when using multithreading](https://root-forum.cern.ch/t/inconsistencies-with-tmva-model-evaluation-in-pyroot-when-using-multithreading/55817)

<div class="topic-metadata">

**Author:** [@pdmonte](https://root-forum.cern.ch/u/pdmonte)\
**Replies:** 1\
**Last updated:** [July 24, 2023, 5:43pm UTC](https://root-forum.cern.ch/t/inconsistencies-with-tmva-model-evaluation-in-pyroot-when-using-multithreading/55817 "2023-07-24T17:43:11Z")

</div>

Hello, We are currently working on applying a TMVA BDT model to an RDataFrame in pyROOT (ROOT version: 6.28/00). Our goal is to use the .weights.xml file for the evaluation. However, during our analysis, we encountered …

---

## [TNVA classification stopping without any error](https://root-forum.cern.ch/t/tnva-classification-stopping-without-any-error/55532)

<div class="topic-metadata">

**Author:** [@myshajkhan](https://root-forum.cern.ch/u/myshajkhan)\
**Replies:** 2\
**Last updated:** [July 5, 2023, 4:26pm UTC](https://root-forum.cern.ch/t/tnva-classification-stopping-without-any-error/55532 "2023-07-05T16:26:45Z")

</div>

Hi, I am trying to run TMVAclassification.C file with my own “.root” files and I think I made all the necessary changes. It ran fine but I think it stopped at the evaluationhttps://github.com/myshajkhan/CMSAnalysis/blob/…

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

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