# TMVA overtraining check and spectator variables

**URL:** <https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457>\
**Category:** TMVA\
**Created:** [February 9, 2021, 7:24am UTC](https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457 "2021-02-09T07:24:04Z")\
**Posts on this page:** 3\
**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:** [February 9, 2021, 7:24am UTC](https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457/1 "2021-02-09T07:24:04Z")

</div>

Dear experts

I am trying to train a classifier to recognize signals. I generated the plot for the TMVA overtraining check. It looks like below:

![image](https://root-forum.cern.ch/uploads/default/original/3X/b/3/b3d6e40b712e960fd7f60328c94f0fb6239bf041.png)

I am wondering is this due to my bad configuration or low statistics (small number of events).

Besides the problem above, I am always wondering the useness of spectator variable. I saw the description that spectators will not be used in training but will appear in test tree. What is it intended for? Why do people want to add spectators and how will they use spectators?

Due to platform constraints, I can only work with ROOT v6.06/1, gcc530, CentOS7.

Best 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:** [February 10, 2021, 5:35pm UTC](https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457/2 "2021-02-10T17:35:43Z")

</div>

Hi ,

Spectator variables are for other usage, like MethodCategory. For standard classification examples spectator variables are not needed.  
An example of usage is [ROOT: tutorials/tmva/TMVAClassificationCategory.C File Reference](https://root.cern.ch/doc/master/TMVAClassificationCategory_8C.html).

Your bad configuration is maybe due to low statistics or bad tree parameters (e.g. too few trees used)

Cheers

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:** [February 12, 2021, 4:12pm UTC](https://root-forum.cern.ch/t/tmva-overtraining-check-and-spectator-variables/43457/3 "2021-02-12T16:12:36Z")

</div>

Thanks for your reply, Lorenzo! Increasing tree number helps!
