# Decision boundaries ploting by using TMVA

**URL:** <https://root-forum.cern.ch/t/decision-boundaries-ploting-by-using-tmva/40462>\
**Category:** TMVA\
**Created:** [July 16, 2020, 9:10am UTC](https://root-forum.cern.ch/t/decision-boundaries-ploting-by-using-tmva/40462 "2020-07-16T09:10:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiechenSJTU](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/f05b48/32.png) [@xiechenSJTU](https://root-forum.cern.ch/u/xiechenSJTU)\
**Post date:** [July 16, 2020, 9:10am UTC](https://root-forum.cern.ch/t/decision-boundaries-ploting-by-using-tmva/40462/1 "2020-07-16T09:10:16Z")

</div>

Hi,  
Recently l have tried to plot the decision boundaries of SVM method like what mentioned in the 43th page of the slides:[https://indico.cern.ch/event/297180/contributions/1655947/attachments/557729/768436/LHCbMVA.pdf](https://indico.cern.ch/event/297180/contributions/1655947/attachments/557729/768436/LHCbMVA.pdf).

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/e/d/edbf797516fcf231f6e07aa7d646788737cc9b27.png)  
Initially, l found some details about how the plot the boundary in root Formu:  
[About the BDT control plot and the decision boundary](https://root-forum.cern.ch/t/about-the-bdt-control-plot-and-the-decision-boundary/28942/3).  
And then l followed it and used the `$ROOTSRC/tmva/tmvagui/src/mvaweights.cxx` where $ROOTSRC is the path to the source code of ROOT.However, it failed. Actually, l just succed in implementing the drawing of signal and background boundaries , not the decision boundary like this.  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/4/d/4d52a845d8b1cdc6a0c97d1188163f24ad125eb7.png)  
(In this figure, l draw all the events from background and signal. And the red frame represents the background, and blue frame respresents the signal.)  
Moreover, l think the interface of mvaweights.cxx has some mistakes. Detailly, the interface is wrong especially doesn’t match the structure of TMVA.root outputed by TMVAClassification.C.

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [July 17, 2020, 5:00pm UTC](https://root-forum.cern.ch/t/decision-boundaries-ploting-by-using-tmva/40462/2 "2020-07-17T17:00:21Z")

</div>

Hi,  
Can you please tell exactly what is wrong with the mvaweights.cxx code, used in the TMVA GUI ?

Lorenzo
