# Is there an easy way to optimize variables in TMVA?

**URL:** <https://root-forum.cern.ch/t/is-there-an-easy-way-to-optimize-variables-in-tmva/36307>\
**Category:** TMVA\
**Created:** [October 10, 2019, 7:29pm UTC](https://root-forum.cern.ch/t/is-there-an-easy-way-to-optimize-variables-in-tmva/36307 "2019-10-10T19:29:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swanski82](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@swanski82](https://root-forum.cern.ch/u/swanski82)\
**Post date:** [October 10, 2019, 7:29pm UTC](https://root-forum.cern.ch/t/is-there-an-easy-way-to-optimize-variables-in-tmva/36307/1 "2019-10-10T19:29:49Z")

</div>

Hi all,

I want to optimize my input variables for BDT as removing them one by one and check their performance by ROC curve for each step. I know this method is kind of a common sense in optimizing the variables, so I wonder if there is somehow an easy way to do it, i.e. a script already implemented in TMVA/ROOT interface etc.?

Thanks a lot.

---

<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:** [October 11, 2019, 11:30am UTC](https://root-forum.cern.ch/t/is-there-an-easy-way-to-optimize-variables-in-tmva/36307/2 "2019-10-11T11:30:01Z")

</div>

Hi,

Not that I am aware of. If you have many variables maybe you can gain insight (and subsequently some speed) by checking the variable importance output after the BDT training.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![Li\_Huang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/848f3c/32.png) [@Li\_Huang](https://root-forum.cern.ch/u/Li_Huang)\
**Post date:** [October 12, 2019, 10:28pm UTC](https://root-forum.cern.ch/t/is-there-an-easy-way-to-optimize-variables-in-tmva/36307/3 "2019-10-12T22:28:21Z")

</div>

“Gene Importance” might be something you’re looking for.  
Also covariance matrix may help.

But in the end, I don’t think there are well definition of what are the best variables.
