Naive Bayes Classifiers and One-hot Encoding of Categorical Variables

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteur principal: Williams, Christopher K. I.
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909183862898688
author Williams, Christopher K. I.
author_facet Williams, Christopher K. I.
contents This paper investigates the consequences of encoding a $K$-valued categorical variable incorrectly as $K$ bits via one-hot encoding, when using a Na\"ıve Bayes classifier. This gives rise to a product-of-Bernoullis (PoB) assumption, rather than the correct categorical Na\"ıve 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_18190
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Naive Bayes Classifiers and One-hot Encoding of Categorical Variables
Williams, Christopher K. I.
Machine Learning
This paper investigates the consequences of encoding a $K$-valued categorical variable incorrectly as $K$ bits via one-hot encoding, when using a Na\"ıve Bayes classifier. This gives rise to a product-of-Bernoullis (PoB) assumption, rather than the correct categorical Na\"ıve 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.
title Naive Bayes Classifiers and One-hot Encoding of Categorical Variables
topic Machine Learning
url https://arxiv.org/abs/2404.18190