# Data Manipulation of categorical data in the background in ML process

**URL:** <https://forum.knime.com/t/data-manipulation-of-categorical-data-in-the-background-in-ml-process/71618>\
**Category:** KNIME Analytics Platform\
**Tags:** machine-learning, python\
**Created:** [August 10, 2023, 8:29am UTC](https://forum.knime.com/t/data-manipulation-of-categorical-data-in-the-background-in-ml-process/71618 "2023-08-10T08:29:42Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [August 15, 2023, 8:49pm UTC](https://forum.knime.com/t/data-manipulation-of-categorical-data-in-the-background-in-ml-process/71618/4 "2023-08-15T20:49:47Z")

</div>

@moritz_skb every KNIME nodes has some sort of documentation like the [XGBoost Tree Ensemble Learner](https://hub.knime.com/knime/extensions/org.knime.features.xgboost/latest/org.knime.xgboost.base.nodes.learner.classification.XGBTreeClassificationLearnerNodeFactory2/):

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/2/4225f8673cb03eadd8826dfc84abff064e4bf745.png)

There you will find additional links and literature to explain what has been done. In this case to the official documentation and there you will find what the algorithm does:

[https://xgboost.readthedocs.io/en/stable/tutorials/categorical.html](https://xgboost.readthedocs.io/en/stable/tutorials/categorical.html)

The KNIME implementation might ‘compress’ such settings or provide some of them by default or with switches in the node.

If you want to do the data preparations yourself you could automate that using tools like vtreat or KNIME nodes (like [Category to Number](https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.base.node.preproc.colconvert.categorytonumber2.CategoryToNumberNodeFactory2/)):

> **[Data preparation for Machine Learning with KNIME and the Python “vtreat” package](https://medium.com/low-code-for-advanced-data-science/data-preparation-for-machine-learning-with-knime-and-the-python-vtreat-package-efcaf58fa783)**
>
> TL;DR: Speed up your ML data preparation with the great Python package vtreat and just a few lines of code — wrapped in a convenient KNIME…

Also there is this approach:

> **[Categorical features encoding](https://hub.knime.com/search?type=all&tag=categorical%20features%20encoding&sort=best)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

* * *

For [H2O Gradient Boosting Machine Learner](https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/gbm.html) and [H2O Random Forest Learner](https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/drf.html) this list also can serve as an overview of what methods are widely used:

[https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/algo-params/categorical\_encoding.html](https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/algo-params/categorical_encoding.html)

You will in this case find the options in the KNIME nodes:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/2/a20f5dd7eaf5783f36bc5252519b6aeb8c7ff050.jpeg)

---

_[View the full topic](https://forum.knime.com/t/data-manipulation-of-categorical-data-in-the-background-in-ml-process/71618)._
