# Continueous vs binned variables as control variables in TMVA

**URL:** <https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324>\
**Category:** TMVA\
**Created:** [June 9, 2021, 10:05pm UTC](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324 "2021-06-09T22:05:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Y.S.Zhang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/cab0a1/32.png) [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Post date:** [June 9, 2021, 10:05pm UTC](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324/1 "2021-06-09T22:05:54Z")

</div>

Dear Experts,

I am working on particle identification using 1/beta. In theory, it is sqrt(m^2 + p^2)/p. Comparing the measured value with different values under different mass assumptions, one can find out the particle specie of the track.

I am wondering how to make use of momentum and beta information. Given the momentum of a particle, 1/beta is meaningful. Momentum is more likely to be a control variable other than discriminating variable. Should I put momentum as a training variable inside the TMVA? Or should I bin the momentum and treat 1/beta as training variable solely? Is there a way to training on continuous variable instead of binning them in TMVA?

Many thanks in advance!

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 15, 2021, 9:23am UTC](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324/2 "2021-06-15T09:23:24Z")

</div>

Hi @Y.S.Zhang ,  
sorry for the high latency! @moneta might be able to help.

Cheers,  
Enrico

---

<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:** [June 16, 2021, 4:01pm UTC](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324/3 "2021-06-16T16:01:42Z")

</div>

Hi,  
I am not sure of your question. You can use momentum and beta both as training variables to a TMVA classifier such a BDT or a neural network, which can work well with correlated variables.  
And it will work on continous variables

Lorenzo

---

<div class="post-metadata">

**Author:** ![Y.S.Zhang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/cab0a1/32.png) [@Y.S.Zhang](https://root-forum.cern.ch/u/Y.S.Zhang)\
**Post date:** [June 16, 2021, 5:22pm UTC](https://root-forum.cern.ch/t/continueous-vs-binned-variables-as-control-variables-in-tmva/45324/4 "2021-06-16T17:22:58Z")

</div>

Hi Lorenzo,

In case of putting all these two variables together, do I need to retrain each time when I have a different momentum spectra in different processes? For example, protons from different particles decay may have different momentum shape. I was thinking to find a _universal_ way to identify particles. In that case, for a given momentum, regardless the momentum shape, I could have a cut on training output. Is it possible to do in TMVA, by taking momentum and 1/beta as the training variable? It might be an interpretation issue of “training variable”. Are all variables serving as discriminating variables or some of them working as control variables for other ones?

Many thanks!
