# Keeping constant target nodes

**URL:** <https://root-forum.cern.ch/t/keeping-constant-target-nodes/31867>\
**Category:** TMVA\
**Created:** [December 3, 2018, 4:56pm UTC](https://root-forum.cern.ch/t/keeping-constant-target-nodes/31867 "2018-12-03T16:56:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pversch](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/b9bd4f/32.png) [@pversch](https://root-forum.cern.ch/u/pversch)\
**Post date:** [December 3, 2018, 4:56pm UTC](https://root-forum.cern.ch/t/keeping-constant-target-nodes/31867/1 "2018-12-03T16:56:28Z")

</div>

Hi,

I am trying to train a MLP with training data that contains the same value for certain target nodes for all training inputs. However, when I try to call the trainallmethods method it says that I have to remove this target node because it is constant. I understand that having a output node that does not change in value for different training inputs does not add anything to the training process but I want to keep the MLP output as it is. Is there a way to disable this?

Kind regards,

Pim

---

<div class="post-metadata">

**Author:** ![sitong](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@sitong](https://root-forum.cern.ch/u/sitong)\
**Post date:** [December 7, 2018, 2:41pm UTC](https://root-forum.cern.ch/t/keeping-constant-target-nodes/31867/2 "2018-12-07T14:41:29Z")

</div>

Hi Pim,

I’m not sure if I understand the problem here. What is the motivation for keeping the output constant in the first place? Doing so would mean that it would not be possible to do back propagation from these outputs. Maybe _spectator variables_ is what you’re looking for?

Cheers,  
Sitong

---

<div class="post-metadata">

**Author:** ![pversch](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/b9bd4f/32.png) [@pversch](https://root-forum.cern.ch/u/pversch)\
**Post date:** [December 7, 2018, 3:47pm UTC](https://root-forum.cern.ch/t/keeping-constant-target-nodes/31867/3 "2018-12-07T15:47:33Z")

</div>

Hi Sitong,

I do not want to keep the output node constant. It is the training value of this specific node that is constant for the whole training dataset. However, the training data that other users will supply might or might not have this. TMVA refuses to train a node that has the same training values in the whole training dataset and I would say that the back propagation would just train the MLP to give outputs close to this value.

Kind regards,

Pim

---

<div class="post-metadata">

**Author:** ![sitong](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@sitong](https://root-forum.cern.ch/u/sitong)\
**Post date:** [December 7, 2018, 4:05pm UTC](https://root-forum.cern.ch/t/keeping-constant-target-nodes/31867/4 "2018-12-07T16:05:36Z")

</div>

Hi Pim,

That’s strange. Can you post/send me the code snippet you use to register the variables and the method?

Cheers,  
Sitong
