mlsanityData to 7 Oct 2026

Comparative Study on the Performance of Categorical Variable Encoders in Classification and Regression Tasks

arXiv 2401.09682 ↗First posted 18 Jan 2024cs.LGcited by 2

Not on the map. Why?

Abstract (arXiv)

Categorical variables often appear in datasets for classification and regression tasks, and they need to be encoded into numerical values before training. Since many encoders have been developed and can significantly impact performance, choosing the appropriate encoder for a task becomes a time-consuming yet important practical issue. This study broadly classifies machine learning models into three categories: 1) ATI models that implicitly perform affine transformations on inputs, such as multi-layer perceptron neural network; 2) Tree-based models that are based on decision trees, such as random forest; and 3) the rest, such as kNN. Theoretically, we prove that the one-hot encoder is the best choice for ATI models in the sense that it can mimic any other encoders by learning suitable weights from the data. We also explain why the target encoder and its variants are the most suitable encoders for tree-based models. This study conducted comprehensive computational experiments to evaluate 14 encoders, including one-hot and target encoders, along with eight common machine-learning models on 28 datasets. The computational results agree with our theoretical analysis. The findings in this study shed light on how to select the suitable encoder for data scientists in fields such as fraud detection, disease diagnosis, etc.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 5 of its 28 references that are in the map. First posted on arXiv 18 Jan 2024.

Builds on

5 of 28 references.

References · 5

  1. 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,120
  2. 2018Similarity encoding for learning with dirty categorical variablescited by 28
  3. 2019Encoding high-cardinality string categorical variablescited by 22
  4. 2021Regularized target encoding outperforms traditional methods in supervised machine learning with high cardinality featurescited by 20
  5. 2021Quantile Encoder: Tackling High Cardinality Categorical Features in Regression Problemscited by 5

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.