# Naive Bayes Classifiers and One-hot Encoding of Categorical Variables

arXiv: https://arxiv.org/abs/2404.18190 · HTML: https://mlsanity.com/paper/2404.18190/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 0 of its 4 references that are in the map.
- First posted on arXiv 28 Apr 2024.

## Built on by (most cited first, 1 of 1)

- [LCDB 1.1: A Database Illustrating Learning Curves Are More Ill-Behaved Than Previously Thought](https://mlsanity.com/paper/2505.15657/) (2025)

## Abstract (arXiv)

This paper investigates the consequences of encoding a K-valued categorical variable incorrectly as K bits via one-hot encoding, when using a Na"ive Bayes classifier. This gives rise to a product-of-Bernoullis (PoB) assumption, rather than the correct categorical Na"ive Bayes classifier. The differences between the two classifiers are analysed mathematically and experimentally. In our experiments using probability vectors drawn from a Dirichlet distribution, the two classifiers are found to agree on the maximum a posteriori class label for most cases, although the posterior probabilities are usually greater for the PoB case.
