# Analyse Random Forest error improvement with additional trees

**URL:** <https://forum.knime.com/t/analyse-random-forest-error-improvement-with-additional-trees/61664>\
**Category:** KNIME Analytics Platform\
**Created:** [February 13, 2023, 5:57pm UTC](https://forum.knime.com/t/analyse-random-forest-error-improvement-with-additional-trees/61664 "2023-02-13T17:57:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Molly123](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/m/f1d935/32.png) [@Molly123](https://forum.knime.com/u/Molly123)\
**Post date:** [February 13, 2023, 5:57pm UTC](https://forum.knime.com/t/analyse-random-forest-error-improvement-with-additional-trees/61664/1 "2023-02-13T17:57:58Z")

</div>

Hi there,

how do i create something like this in Knime?

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/5/25ddd6a1e149e5b2b76b428e4871b7691fd77b7c.png)

Best greetings

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [February 14, 2023, 9:32am UTC](https://forum.knime.com/t/analyse-random-forest-error-improvement-with-additional-trees/61664/2 "2023-02-14T09:32:37Z")

</div>

Hi @Molly123,

Interesting question. I have implemented from scratch the following KNIME workflow to illustrate a possible way to answer your question using KNIME:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/5/6/5640e2fc05f665ba2cf98f7a9b70d67da8b4274b.png)

The plot below shows that for this particular scholar problem (The Titanic Dataset), a RF made of about 80 trees is performing equally well as RF with more trees:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/5/6/561d1830c607ba088e43393981caac0bc1bc6636.png)

The workflow can be downloaded from the following KNIME hub link:

> **[20230214 Pikairos Analyse Random Forest error improvement with additional...](https://hub.knime.com/pikairos/spaces/Public/latest/20230214%20Pikairos%20Analyse%20Random%20Forest%20error%20improvement%20with%20additional%20trees~CGk5rK3zDmmJoh0u)**
>
> This workflow illustrates how to measure the error performance of a Random Forest Classifier based on the number of trees. THe workflow brings a possible answe…

Hope it helps.

Best greetings too,  
Ael

---

<div class="post-metadata">

**Author:** ![DiaAzul](https://forum-cdn.knime.com/user_avatar/forum.knime.com/diaazul/32/48297_2.png) [@DiaAzul](https://forum.knime.com/u/DiaAzul)\
**Post date:** [February 15, 2023, 11:40pm UTC](https://forum.knime.com/t/analyse-random-forest-error-improvement-with-additional-trees/61664/3 "2023-02-15T23:40:08Z")

</div>

I’ll add a small amendment to @aworker workflow.

KNIME has parameter optimisation nodes which iterate over models to find the best combination of parameters. This can be set up using a Brute Force parameter optimisation to iterate over the number of tree (could also iterate over other parameters as well) to produce the output you seek. The additional benefit is that the final loop node will output the ‘best’ parameter for the model as well as all the other model calculations performed. Also, if all you are looking for is the best parameter combination it can use optimisation algorithms to sample the parameter space and determine the best parameters without needing to do an exhaustive search.

[TitanicParameterOptimisation.knwf](https://forum.knime.com/uploads/short-url/yCE71P7aKfcFpjxUlBSYh3qlgDH.knwf) (65.2 KB)

 ![Screenshot_20230215_233405](https://forum-cdn.knime.com/uploads/default/original/3X/7/c/7ce1e270cd98a4ccb08e96644cab19e99eff7de9.png)

 ![Screenshot_20230215_233934](https://forum-cdn.knime.com/uploads/default/original/3X/8/d/8d1bcd73542632a27e0b74c96ce7feccde26712c.png)

DiaAzul  
[LinkedIn](https://www.linkedin.com/in/david-plummer-ab41791/) | [Medium](https://medium.com/@DiaAzul) | [GitHub](https://github.com/DiaAzul)

---

<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:** [February 22, 2023, 11:40pm UTC](https://forum.knime.com/t/analyse-random-forest-error-improvement-with-additional-trees/61664/4 "2023-02-22T23:40:21Z")

</div>

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