# How to set test error limit in TMVA DNN method?

**URL:** <https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397>\
**Category:** ROOT\
**Tags:** tmva, root\
**Created:** [August 30, 2022, 7:40am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397 "2022-08-30T07:40:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dawei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Post date:** [August 30, 2022, 7:40am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/1 "2022-08-30T07:40:04Z")

</div>

As the TMVAUserGuide.pdf said, the Convergence criterion of DNN method is setting the number of  
training epochs without improvement in test error to be performed before ending the training phase. But how can we determine whether the test error has improved,and how can we control it? Can we set a number such as 0.01, when test error is reduced by more than 0.01, we think it has improved.

---

<div class="post-metadata">

**Author:** ![Dawei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Post date:** [August 30, 2022, 9:02am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/2 "2022-08-30T09:02:07Z")

</div>

@couet Could you help me？Thank you！

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [August 30, 2022, 9:03am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/3 "2022-08-30T09:03:53Z")

</div>

As it is a TMVA question the best person to help you is @moneta.

---

<div class="post-metadata">

**Author:** ![Dawei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Post date:** [August 30, 2022, 9:15am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/4 "2022-08-30T09:15:24Z")

</div>

Thank you very much！ 😃

---

<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:** [August 30, 2022, 9:57am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/5 "2022-08-30T09:57:27Z")

</div>

Hi,  
In the TMVA DNN you can control the convergence with two criteria,

- the maximum number of training epochs, `MaxEpochs`
- the number of epochs that the test error is not reduced, `ConvergenceSteps`.  
For example if you set `ConvergeSteps=5` the training will stop after seeing 5 training epochs where the test error is not reduced, i.e. is larger than the minimum test error found so far.

Unfortunately we don’t have another parameter controlling the actual reduction of the test error. For example if it is not reduced by more than 0.01. We could eventually implement this if it is needed

Best

Lorenzo

---

<div class="post-metadata">

**Author:** ![Dawei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Post date:** [August 30, 2022, 11:45am UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/6 "2022-08-30T11:45:21Z")

</div>

Hi, thanks for your reply. 😀 I have understood the convergence criteria. But it seems that there is not “MaxEpochs” in the options of training strategy. Where can I search the whole options.

Best  
David

 ![微信截图_20220830192525](https://root-forum.cern.ch/uploads/default/original/3X/0/9/09cc5dec1ee0d9699189315b995d00441ed3a842.png)

---

<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:** [August 30, 2022, 12:29pm UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/7 "2022-08-30T12:29:22Z")

</div>

Which version of the TMVA Users guide are you having ?  
If you download it from [here](https://root.cern.ch/download/doc/tmva/TMVAUsersGuide.pdf), you will have `MaxEpochs` documented in Table 23.

Lorenzo

---

<div class="post-metadata">

**Author:** ![Dawei](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/5f8ce5/32.png) [@Dawei](https://root-forum.cern.ch/u/Dawei)\
**Post date:** [August 30, 2022, 1:13pm UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/8 "2022-08-30T13:13:49Z")

</div>

Thank you very much！My users guide version is 4.2,it is a little old 😀

best  
David

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 13, 2022, 1:14pm UTC](https://root-forum.cern.ch/t/how-to-set-test-error-limit-in-tmva-dnn-method/51397/9 "2022-09-13T13:14:19Z")

</div>

Closed on September 13, 2022, 1:14pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
