# ROC curve from the BDT and BDTF models

**URL:** <https://root-forum.cern.ch/t/roc-curve-from-the-bdt-and-bdtf-models/35641>\
**Category:** TMVA\
**Created:** [August 14, 2019, 5:58pm UTC](https://root-forum.cern.ch/t/roc-curve-from-the-bdt-and-bdtf-models/35641 "2019-08-14T17:58:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@dlin](https://root-forum.cern.ch/u/dlin)\
**Post date:** [August 14, 2019, 5:58pm UTC](https://root-forum.cern.ch/t/roc-curve-from-the-bdt-and-bdtf-models/35641/1 "2019-08-14T17:58:08Z")

</div>

Dear TMVA experts,

I am learning to use the TMVA package, here is the models (BDT and BDTF) I used:  
factory -\> BookMethod(dataloader, Types::kBDT, “BDT”, “!H:!V:NTrees=850:MinNodeSize=2.5%:MaxDepth=4:BoostType=AdaBoost:AdaBoostBeta=0.5:UseBaggedBoost:BaggedSampleFraction=0.5:SeparationType=GiniIndex:nCuts=20”);

factory -\> BookMethod(dataloader, Types::kBDT, “BDTF”, “!H:!V:NTrees=50:MinNodeSize=2.5%:UseFisherCuts:MaxDepth=3:BoostType=AdaBoost:AdaBoostBeta=0.5:SeparationType=GiniIndex:nCuts=20”);

The training was successful, how ever I got very strange ROC curves, and the signal efficiency is almost a constant 100%:  
: Testing efficiency compared to training efficiency (overtraining check)  
: -------------------------------------------------------------------------------------------------------------------  
: DataSet MVA Signal efficiency: from test sample (from training sample)  
: Name: Method: @B=0.01 @B=0.10 @B=0.30  
: -------------------------------------------------------------------------------------------------------------------  
: babarTMVA BDT : 1.000 (1.000) 1.000 (1.000) 1.000 (1.000)  
: babarTMVA BDTF : 1.000 (1.000) 1.000 (1.000) 1.000 (1.000)  
Anyone has idea, where I did wrong, or how can I tune them?  
Thanks a lot in advance!

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [August 15, 2019, 5:52pm UTC](https://root-forum.cern.ch/t/roc-curve-from-the-bdt-and-bdtf-models/35641/2 "2019-08-15T17:52:08Z")

</div>

Hi,

Having perfect separation is usually an indication of an easy dataset.

I would suggest you start with checking you inputs using the TMVA GUI (see e.g. the TMVAClassification.C example). This can help you understand if you have any variable that is particularly easy for the method to use for discrimination.

Increasing the number of events in your input would be one way of “making it harder” if your current dataset is small; The full complexity might not be visible.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![dlin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@dlin](https://root-forum.cern.ch/u/dlin)\
**Post date:** [August 19, 2019, 10:13pm UTC](https://root-forum.cern.ch/t/roc-curve-from-the-bdt-and-bdtf-models/35641/3 "2019-08-19T22:13:32Z")

</div>

Hi Kim,

Many thanks for the explanation.  
You are right, my datasets might have variables very powerful to separate the background and signal  
Thanks a lot!
