Skip to main content
QUICK REVIEW

[Paper Review] A benchmark of categorical encoders for binary classification

Federico Matteucci, Vadim Arzamasov|arXiv (Cornell University)|Jul 17, 2023
Machine Learning and Data ClassificationComputer Science3 citations
TL;DR

This paper presents the most comprehensive benchmark to date of categorical encoders for binary classification, evaluating 32 encoder configurations across 50 datasets, five machine learning models, four metrics, three tuning strategies, and ten aggregation methods. It reveals that encoder performance is highly sensitive to experimental factors, with significant variations in rankings depending on model choice, metrics, and aggregation strategies—challenging prior conclusions from narrower studies and emphasizing the need for broader experimental design in encoder evaluation.

ABSTRACT

Categorical encoders transform categorical features into numerical representations that are indispensable for a wide range of machine learning models. Existing encoder benchmark studies lack generalizability because of their limited choice of (1) encoders, (2) experimental factors, and (3) datasets. Additionally, inconsistencies arise from the adoption of varying aggregation strategies. This paper is the most comprehensive benchmark of categorical encoders to date, including an extensive evaluation of 32 configurations of encoders from diverse families, with 36 combinations of experimental factors, and on 50 datasets. The study shows the profound influence of dataset selection, experimental factors, and aggregation strategies on the benchmark's conclusions -- aspects disregarded in previous encoder benchmarks.

Motivation & Objective

  • To address the lack of generalizability in existing categorical encoder benchmarks, which often use limited datasets, inconsistent metrics, and unclear tuning or aggregation strategies.
  • To evaluate the impact of experimental factors—such as machine learning models, quality metrics, tuning strategies, and aggregation methods—on encoder performance rankings.
  • To isolate and recommend the most robust encoder configurations across diverse experimental settings, especially for decision trees and logistic regression.
  • To quantify replicability using ρ-replicability and J-replicability, demonstrating that results vary significantly across models and dataset samples.
  • To provide a publicly available benchmark framework to support reproducible and comparable encoder evaluation in future research.

Proposed method

  • The study evaluates 32 encoder configurations, including state-of-the-art and novel encoders, across 50 binary classification datasets from diverse domains.
  • It employs five widely used machine learning models: logistic regression, random forest, gradient boosting, k-NN, and SVM, with three distinct tuning strategies: no tuning, model tuning, and full pipeline tuning.
  • Four quality metrics—ROC AUC, balanced accuracy, accuracy, and precision-recall AUC—are used to assess performance, ensuring multi-faceted evaluation.
  • Ten aggregation strategies, including Friedman-Nemenyi, Kemeny-Young, and heuristic ranking, are applied to derive consensus rankings and assess sensitivity to post-processing methods.
  • Replicability is quantified using ρ-replicability (Spearman correlation of rankings) and J-replicability (Jaccard similarity of top-k sets), enabling statistical validation of consistency across experimental conditions.
  • All experiments are conducted with standardized preprocessing, and code is released publicly to ensure reproducibility and facilitate future benchmarking.
Figure 1 : Sensitivity as the average similarity between rankings, measured with $\rho$ (upper triangle) and $J$ (lower triangle), computed between individual rankings for varying: (a) ML model, (b) quality metric, (c) tuning strategy, and between consensus rankings for varying (d) aggregation strat
Figure 1 : Sensitivity as the average similarity between rankings, measured with $\rho$ (upper triangle) and $J$ (lower triangle), computed between individual rankings for varying: (a) ML model, (b) quality metric, (c) tuning strategy, and between consensus rankings for varying (d) aggregation strat

Experimental results

Research questions

  • RQ1How do different experimental factors—such as machine learning model, quality metric, tuning strategy, and aggregation method—affect the ranking of categorical encoders?
  • RQ2To what extent is the performance of categorical encoders replicable across different datasets and experimental configurations?
  • RQ3Which encoder configurations consistently outperform others across diverse models and metrics, particularly for tree-based and linear models?
  • RQ4How do aggregation strategies influence the consensus ranking of encoders, and what impact do they have on the interpretation of benchmark results?
  • RQ5Why do prior studies report conflicting conclusions about the best-performing encoders, and can this be explained by differences in experimental design?

Key findings

  • Encoder performance is highly sensitive to the choice of machine learning model, with logistic regression showing the highest replicability (ρ-replicability) and decision trees the lowest.
  • For decision trees, Weight of Evidence consistently ranked first, though statistical tests did not show a significant difference from other encoders.
  • For logistic regression, Sum, One-Hot, Binary, and Weight of Evidence achieved significantly higher ranks than other encoders, with statistical significance confirmed via t-tests.
  • Similarity encoders like Min-hash and One-Hot showed no significant performance difference in t-tests with a 0.05 significance level, contradicting earlier claims of superiority.
  • Aggregation strategies such as Kemeny-Young and Friedman-Nemenyi produced notably different consensus rankings, highlighting the critical impact of post-processing on benchmark interpretation.
  • Replicability metrics revealed that larger dataset samples improve reliability, though this trend does not hold uniformly for J-replicability, indicating complex dependencies in ranking consistency.
Figure 2 : Replicability as the average similarity of consensus rankings from disjoint subsets of datasets.
Figure 2 : Replicability as the average similarity of consensus rankings from disjoint subsets of datasets.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.