Skip to content

Repository of the paper "A benchmark of categorical encoders for binary classification".

License

Notifications You must be signed in to change notification settings

DrCohomology/EncoderBenchmarking

Repository files navigation

A benchmark of categorical encoders for binary classification

Repository for the paper A benchmark of categorical encoders for binary classification, accepted at NeurIPS 2023, Datasets and Benchmarks track.

Ranks of encoders

Ranks of encoders conditional on the model (lower rank is better). Sum, One-Hot, WoE, and Binary encoders are consistently among the best for logistic regression (LogReg), while no encoder is clearly on top for decision tree (DT). Even considering all the models (LogReg, DT, kNN, SVM, and LGBM), Sum, One-Hot, WoE, and Binary encoders are the best ones.

Replicating the experimental results

Installation

Requirements

  1. Install Python 3.8.10;
  2. create and activate a virtual environment, we call it venv;
  3. install dependencies with pip install -r requirements.

Optional requirements

Our implementations of GLMM-based encoders require the rpy2 module and R to be installed. The R version we used is 4.2.2, with the lme4 package version 1.1-31.
To aggregate results with Kemeny aggregation, install and configure Gurobi and its Python API.

Configure, add to, and run the experiments

In the experiments directory.

Analysis and figures

All of the code necessary to reproduce the analysis and the plots is available in the analysis directory.

About

Repository of the paper "A benchmark of categorical encoders for binary classification".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published