# Tutorial on TMVA Classifiers

**URL:** <https://root-forum.cern.ch/t/tutorial-on-tmva-classifiers/54697>\
**Category:** TMVA\
**Created:** [May 2, 2023, 2:34pm UTC](https://root-forum.cern.ch/t/tutorial-on-tmva-classifiers/54697 "2023-05-02T14:34:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Emil\_R](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/emil_r/32/31255_2.png) [@Emil\_R](https://root-forum.cern.ch/u/Emil_R)\
**Post date:** [May 26, 2023, 6:17am UTC](https://root-forum.cern.ch/t/tutorial-on-tmva-classifiers/54697/4 "2023-05-26T06:17:01Z")

</div>

There is a Macro called [TMVAClassificationApplication](https://root.cern/doc/master/TMVAClassificationApplication_8C.html) which did kind of what I wanted. It is a little bit difficult to first understand this. In the end, the Macro [TMVAClassification](https://root.cern/doc/master/TMVAClassification_8C.html) creates a root file that contains everything you need to have (called TMVA.root or similar). The Application Macro then has an object called TReader that loads this file. Afterwards you have to book a method (the one you trained before). Lastly you iterate over your TTree that contains the data you want to classify and for each value you can let this reader calculate a value (depending on the type of classifier for example from -1 to 1) and then you have to simply take the data with a value above threshold and call this your signal.  
I hope I could help a little, but sadly I myself am no expert on this topic yet.  
Cheers,  
Emil

---

_[View the full topic](https://root-forum.cern.ch/t/tutorial-on-tmva-classifiers/54697)._
