Encoding categorical data: Is there yet anything 'hotter' than one-hot encoding?

Ekaterina Poslavskaya, Alexey Korolev
12/28/2023
cs.LG

No confident code implementation found for this paper.

Abstract

Categorical features are present in about 40% of real world problems, highlighting the crucial role of encoding as a preprocessing component. Some recent studies have reported benefits of the various target-based encoders over classical target-agnostic approaches. However, these claims are not supported by any statistical analysis, and are based on a single dataset or a very small and heterogeneous sample of datasets. The present study explores the encoding effects in an exhaustive sample of classification problems from OpenML repository. We fitted linear mixed-effects models to the experimental data, treating task ID as a random effect, and the encoding scheme and the various characteristics of categorical features as fixed effects. We found that in multiclass tasks, one-hot encoding and Helmert contrast coding outperform target-based encoders. In binary tasks, there were no significant differences across the encoding schemes; however, one-hot encoding demonstrated a marginally positive effect on the outcome. Importantly, we found no significant interactions between the encoding schemes and the characteristics of categorical features. This suggests that our findings are generalizable to a wide variety of problems across domains.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{poslavskaya2023encoding,
  title  = {Encoding categorical data: Is there yet anything 'hotter' than one-hot encoding?},
  author = {Ekaterina Poslavskaya and Alexey Korolev},
  year   = {2023},
  eprint = {2312.16930},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.16930v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.16930.svg)](https://codeofpaper.com/paper/2312.16930)

Discussion