# Append Predicted Column in CART model

**URL:** <https://forum.knime.com/t/append-predicted-column-in-cart-model/6679>\
**Category:** KNIME Analytics Platform\
**Created:** [September 17, 2014, 6:06pm UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679 "2014-09-17T18:06:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauuuuu5](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mauuuuu5/32/351_2.png) [@mauuuuu5](https://forum.knime.com/u/mauuuuu5)\
**Post date:** [September 17, 2014, 6:06pm UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679/1 "2014-09-17T18:06:10Z")

</div>

Hello, I am doing a Cart tree and I wonder if there is a way to append the predicted column that appears in the "Decision Tree Predictor" node&nbsp;to the whole base or data&nbsp;before doing the partition.&nbsp;

I want to know because I think that I spend a lot of time applying and formulating the terminal nodes rules in&nbsp;Excel in order to find the predicted bin.&nbsp;&nbsp;

Best Regards

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Aaron\_Hart](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aaron_hart/32/7814_2.png) [@Aaron\_Hart](https://forum.knime.com/u/Aaron_Hart)\
**Post date:** [September 19, 2014, 2:19pm UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679/2 "2014-09-19T14:19:29Z")

</div>

I am not quite sure I understand the question. &nbsp;Would it be possible for you to share an example workflow demonstrating what you are trying to accomplish?

Regards,

Aaron

---

<div class="post-metadata">

**Author:** ![mauuuuu5](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mauuuuu5/32/351_2.png) [@mauuuuu5](https://forum.knime.com/u/mauuuuu5)\
**Post date:** [September 21, 2014, 6:03am UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679/3 "2014-09-21T06:03:01Z")

</div>

Hi Aaron please find attached the example workflow

Regards

&nbsp;

&nbsp;

- [forum.zip](https://www.knime.com/sites/default/files/forum.zip)

---

<div class="post-metadata">

**Author:** ![Aaron\_Hart](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aaron_hart/32/7814_2.png) [@Aaron\_Hart](https://forum.knime.com/u/Aaron_Hart)\
**Post date:** [September 22, 2014, 11:05am UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679/4 "2014-09-22T11:05:00Z")

</div>

If I understand correctly, you can simply re-use the model output port with a new predictor node to evaluate all of your data with the model. &nbsp;It is also possible to write the decision tree itself into a file and re-use it in another application, or even just a different workflow. &nbsp;Attached you will find some examples of this.&nbsp;

I would caution you though to be careful when using a model on the same data that you used to build it. &nbsp;The fit may be better than you can expect in production as the model could be over-fit to the training data (if it is not a general solution). If evaulating the quality of your model is your concern at this point, I would look to cross validation. &nbsp;This will let you re-run your model building process several times with the same settings to get a better idea for the stability of your model. &nbsp;An example of this is also included.&nbsp;

Regards,

Aaron

- [model\_scoring.zip](https://www.knime.com/sites/default/files/model_scoring.zip)

---

<div class="post-metadata">

**Author:** ![mauuuuu5](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mauuuuu5/32/351_2.png) [@mauuuuu5](https://forum.knime.com/u/mauuuuu5)\
**Post date:** [September 25, 2014, 9:23pm UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679/5 "2014-09-25T21:23:18Z")

</div>

Thank you Aaron

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 16, 2021, 2:23pm UTC](https://forum.knime.com/t/append-predicted-column-in-cart-model/6679/6 "2021-04-16T14:23:05Z")

</div>

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