# TMVA correlated variables

**URL:** <https://root-forum.cern.ch/t/tmva-correlated-variables/28618>\
**Category:** TMVA\
**Created:** [April 8, 2018, 2:20pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618 "2018-04-08T14:20:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![calbet](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@calbet](https://root-forum.cern.ch/u/calbet)\
**Post date:** [April 8, 2018, 2:20pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/1 "2018-04-08T14:20:05Z")

</div>

Dear experts,  
I wonder if it a problem if we use correlate variables in the MVA? For example if I use pT(1), pT(2), and pT(1+2), we expect non negligible correlation, but if the separation btw signal and background in the end is better with these 3 variables (instead of using only 2), is there a reason why I should not use these 3 variables?  
Regards

---

<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:** [April 9, 2018, 4:03pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/2 "2018-04-09T16:03:20Z")

</div>

Hi,

It depends on the method. If you use a NN it should be no problem to use correlated variables, because they can exploit difference in the correlation between the two classes

Lorenzo

---

<div class="post-metadata">

**Author:** ![calbet](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@calbet](https://root-forum.cern.ch/u/calbet)\
**Post date:** [April 9, 2018, 4:41pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/3 "2018-04-09T16:41:48Z")

</div>

Dear Moneta,  
could it be a problem for other method? I mean if variables are strongly correlated, if should just not bring more information, but I do not see what it should be a problem?  
Regards

---

<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:** [April 10, 2018, 3:44pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/4 "2018-04-10T15:44:03Z")

</div>

Hi,

As you say, adding a highly correlated variable should add very little new information, so one would expect similar performance for the two trainings. However, as [this](https://stackoverflow.com/questions/14813884/correlated-features-and-classification-accuracy#14814439) stack overflow answer discusses:

When adding more features the dimensionality of the fitting problem increases. If the input space is large in comparison to the number of data points in you training data it can be difficult for the method to find a good solution. (Curse of dimensionality.)

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![calbet](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@calbet](https://root-forum.cern.ch/u/calbet)\
**Post date:** [April 10, 2018, 3:48pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/5 "2018-04-10T15:48:36Z")

</div>

Dear Kialbert,

- ok, but if I look at my outputs and results and everything look ok, nothing forbbid me to use correlated variables right?  
Regards

---

<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:** [April 10, 2018, 3:52pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/6 "2018-04-10T15:52:57Z")

</div>

Hi,

No, nothing forbids you from doing that 🙂

For example, many Kaggle competition winners use “feature engineering” extensively (at least up to 2016). Feature engineering entails adding combinations of lower level features to the input data.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![calbet](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@calbet](https://root-forum.cern.ch/u/calbet)\
**Post date:** [April 10, 2018, 3:54pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/7 "2018-04-10T15:54:20Z")

</div>

Dear Kialbert,  
ok, thank you for your answer.  
Regards

---

<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:** [April 10, 2018, 5:06pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/8 "2018-04-10T17:06:07Z")

</div>

Hi,

If a particular post answered your question, please mark it as “Solution”. This helps other users with similar questions 🙂

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![calbet](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@calbet](https://root-forum.cern.ch/u/calbet)\
**Post date:** [April 11, 2018, 11:18am UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/9 "2018-04-11T11:18:15Z")

</div>

Dear kialbert,  
ok, I still wonder if the muticlassification exist for DNN?  
Regards

---

<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:** [April 11, 2018, 12:17pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/10 "2018-04-11T12:17:29Z")

</div>

Hi,

This should then be a new topic since it is a separate question from the initial post 🙂

And yes, you can use multi class classification with the DNN! Check the example `TMVAMulticlass.C` in `$ROOTSYS/tutorials/tmva`!

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![calbet](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/4af34b/32.png) [@calbet](https://root-forum.cern.ch/u/calbet)\
**Post date:** [April 11, 2018, 4:01pm UTC](https://root-forum.cern.ch/t/tmva-correlated-variables/28618/11 "2018-04-11T16:01:20Z")

</div>

Dear Kialbert,  
for the "mark it as “Solution” I do not see any button for that?  
Regards
