Skip to content

Benchmarks

These benchmarks compare LogitEncoder with every encoder in category_encoders (and with scikit-learn's TargetEncoder) on public binary classification datasets from OpenML. They test every combination of LogitEncoder's three encodings (log odds, coefficients, and marginal effects), two models (univariate and joint), and two backends (sklearn and statsmodels), plus its uncertainty columns.

Findings

  • With thousands of categories per column, LogitEncoder has the highest AUC. On the four datasets where some encoders had to be skipped (Amazon, kick, KDD upselling) or failed (speed dating), LogitEncoder's joint log odds with uncertainty columns have a mean AUC of 0.817 and its joint coefficients 0.816, against 0.813 for scikit-learn's TargetEncoder and 0.811 for the best category_encoders encoder (CatBoost). The next best category_encoders encoder, Gray, has 0.799.
  • With few categories per column, it is about as good as the best, and more consistent. On the nine datasets where every encoder ran, the joint LogitEncoder settings have the highest mean AUC (0.866), ahead of Polynomial, OneHot, and WOE (0.863). The differences are small. WOE, GLMM, and the target encoders do slightly better with tree models (WOE has 0.872 with gradient boosting and 0.873 with random forests, against 0.867 to 0.871 for the joint LogitEncoder) but worse with logistic regression (0.836 to 0.843, against 0.858 to 0.859).
  • Head to head, it splits the datasets. The best of the 14 LogitEncoder settings beats the best of the 23 category_encoders encoders on 15 of the 39 dataset and classifier pairs, ties on 6, and loses on 18, with a median difference of 0.000 AUC. Its wins are on the larger datasets. Its largest losses (0.008 to 0.018 AUC) are on the three smallest datasets (colic, dresses sales, and credit-g, with 368 to 1,000 rows), where each cross-fitting fold's model is fit on only a few hundred rows.
  • Cross-fitting is what separates the supervised encoders. category_encoders' target, m-estimate, James-Stein, count-target, and weight of evidence encoders encode their training rows with values fit on those same rows. They do well with few categories, but with thousands their mean AUC falls to 0.746 to 0.794. The two encoders that cross-fit (LogitEncoder and scikit-learn's TargetEncoder) hold up.
  • The encoding matters little; the model matters more. With the sklearn backend on all 13 datasets, the log odds and coefficients have a mean AUC of 0.848 and the marginal effects 0.847. Joint models have 0.850 and univariate models 0.846, a difference that comes entirely from logistic regression (0.844 against 0.832), which benefits from each column being adjusted for the others. So model = 'joint' is the default.
  • Uncertainty columns help only with many categories. Adding the standard error and count columns (return_uncertainty = True) raised the joint log odds' mean AUC from 0.815 to 0.817 on the four high-cardinality datasets, but across all 13 datasets it lowered the mean AUC by 0.002 to 0.004 for five of the six setting and classifier pairs, since most categories have plenty of rows. The one large gain (0.142 AUC) is the univariate model with logistic regression on tic-tac-toe, where the counts carry information that the univariate log odds miss.
  • The backends agree. Where both ran the same setting, sklearn and statsmodels have the same mean AUC (0.857), and their AUCs differ by 0.0005 on average (0.008 at most).
  • It is slower than most encoders. The median time to fit and encode a fold is 0.4 to 1.2 seconds on the nine smaller-cardinality datasets (against 0.1 to 0.4 for most category_encoders encoders) and 3.6 to 8 seconds on the four high-cardinality ones (against 0.7 to 2). Joint marginal effects are the slowest setting there (25 seconds per fold), since they average over every row for every category.

Method

  • Datasets. Thirteen binary classification datasets with categorical columns, from 3 categories per column (tic-tac-toe) to more than 8,000 (KDD Cup 2009 upselling). Datasets with more than 20,000 rows are subsampled to 20,000, stratified by the outcome. The rarer class is the positive class.
  • Folds. Five stratified folds, shared by every encoder. Each encoder is fit on four folds with fit_transform (so supervised encoders encode their training rows as they are designed to: LogitEncoder and scikit-learn's TargetEncoder cross-fit them, LeaveOneOutEncoder leaves each row out, and CatBoostEncoder encodes them in order) and encodes the fifth with transform.
  • Classifiers. Each encoding is scored with three classifiers: LogisticRegression (after median imputation and standardization), HistGradientBoostingClassifier, and RandomForestClassifier with 100 trees. Numeric columns pass through unchanged.
  • Settings. Every encoder uses its default settings, with the categorical columns named in cols. LogitEncoder uses C = 1.0, cv = 5, and the most frequent category as the reference, with each setting's encoding, model, and backend in its name (Logit.<encoding>.<model>.<backend>). Two more settings (...uncertainty) add the standard error and count columns of return_uncertainty = True to the sklearn log odds settings.
  • Score. The area under the ROC curve (AUC) on the held-out fold, averaged over the folds. Log loss is also saved in the results files.
  • Skipped runs. Encoders that make one column per category are skipped when they would make more than 1,000 columns, and models with a dense design matrix (LogitEncoder's statsmodels backend and GLMMEncoder) are skipped when they would have more than 1,000 dummies.

The code is in the repository's benchmarks folder, and the scores of every fold are in benchmarks/results. To rerun the benchmarks (which download about 50 MB from OpenML) and rebuild these tables:

uv run --group benchmarks python -m benchmarks.run
uv run --group benchmarks python -m benchmarks.report

Results

How to read the tables

  • Mean AUC is the AUC on the held-out folds, averaged over the table's datasets and the three classifiers. The next three columns average it over the datasets for one classifier each. Every encoder in a summary table ran on the same datasets, so its numbers can be compared directly.
  • Seconds is the median time to fit the encoder and encode one fold.
  • Names starting with "Logit" are LogitEncoder settings (with the sklearn backend unless "statsmodels" is named), "sklearn Target" is scikit-learn's TargetEncoder, and the other names are category_encoders encoders.

Datasets

Dataset Description Rows used Rows Categorical columns Most categories
tic-tac-toe Endgame boards; 9 three-level columns 958 958 9 3
credit-approval Credit card applications 690 690 9 15
credit-g German credit risk 1,000 1,000 13 10
dresses-sales Dress attributes and sales 500 500 11 25
colic Horse colic surgery 368 368 19 63
churn Telecom churn, with state as a category 5,000 5,000 5 51
telco-churn IBM telco customer churn 7,043 7,043 15 4
speed-dating Speed dating matches; 61 categorical columns 8,378 8,378 61 260
adult Census income above $50,000 20,000 48,842 8 42
bank-marketing Term deposit subscriptions 20,000 45,211 9 12
amazon Amazon employee access; thousands of IDs per column 20,000 32,769 9 5,801
kick Bad used-car purchases; up to 1,063 models 20,000 72,983 18 837
kdd-upselling KDD Cup 2009 upselling; 38 columns, up to 15,415 categories 20,000 50,000 38 8,348

Datasets where every encoder ran

9 datasets (tic-tac-toe, credit-approval, credit-g, dresses-sales, colic, churn, telco-churn, adult, bank-marketing), with all three classifiers.

Encoder Mean AUC Logistic regression Gradient boosting Random forest Seconds
Logit coefficients, joint 0.866 0.859 0.869 0.870 0.4
Logit coefficients, joint (statsmodels) 0.866 0.859 0.868 0.871 1.0
Logit log odds, joint 0.866 0.858 0.870 0.869 0.4
Logit log odds, joint (statsmodels) 0.865 0.858 0.869 0.868 1.1
Logit marginal effects, joint 0.865 0.858 0.867 0.869 0.5
Logit marginal effects, joint (statsmodels) 0.865 0.858 0.866 0.869 1.2
Polynomial 0.863 0.854 0.870 0.864 0.3
OneHot 0.863 0.852 0.868 0.869 0.3
WOE 0.863 0.842 0.872 0.873 0.2
Sum 0.862 0.854 0.868 0.866 0.3
GLMM 0.862 0.843 0.870 0.873 3.3
MultiHot 0.862 0.852 0.868 0.866 0.2
Logit log odds, univariate + uncertainty 0.862 0.855 0.865 0.865 1.0
Logit log odds, univariate 0.861 0.842 0.870 0.872 1.0
Logit log odds, joint + uncertainty 0.861 0.854 0.867 0.862 0.4
Logit log odds, univariate (statsmodels) 0.861 0.842 0.869 0.872 1.1
MEstimate 0.861 0.839 0.870 0.872 0.2
sklearn Target 0.861 0.839 0.869 0.873 0.1
RankHot 0.860 0.857 0.867 0.857 1.4
Logit marginal effects, univariate 0.860 0.842 0.868 0.870 1.1
Logit marginal effects, univariate (statsmodels) 0.860 0.842 0.868 0.870 1.1
Target 0.860 0.841 0.869 0.870 0.3
CountTarget 0.860 0.841 0.869 0.870 0.4
Logit coefficients, univariate (statsmodels) 0.859 0.842 0.867 0.870 1.0
BackwardDifference 0.859 0.856 0.866 0.857 0.3
Helmert 0.859 0.852 0.866 0.860 0.3
Logit coefficients, univariate 0.859 0.842 0.866 0.870 1.1
Gray 0.859 0.851 0.867 0.860 0.3
JamesStein 0.859 0.836 0.869 0.872 0.4
BaseN 0.855 0.847 0.862 0.857 0.2
Binary 0.855 0.847 0.862 0.857 0.3
Ordinal 0.844 0.804 0.866 0.862 0.2
Count 0.837 0.782 0.868 0.862 0.2
CatBoost 0.821 0.831 0.828 0.804 0.3
Hashing 0.819 0.803 0.831 0.822 0.1
Summary 0.816 0.809 0.824 0.816 0.7
Quantile 0.788 0.783 0.794 0.788 0.3
LeaveOneOut 0.665 0.825 0.528 0.643 0.3

Datasets where some encoders were skipped or failed

4 datasets (speed-dating, amazon, kick, kdd-upselling), with all three classifiers. Encoders that did not run on all of them are left out: BackwardDifference, GLMM, Helmert, MultiHot, OneHot, Polynomial, RankHot, Sum, and the statsmodels LogitEncoder settings.

Encoder Mean AUC Logistic regression Gradient boosting Random forest Seconds
Logit log odds, joint + uncertainty 0.817 0.812 0.827 0.811 5.0
Logit log odds, univariate + uncertainty 0.816 0.810 0.829 0.810 7.7
Logit coefficients, joint 0.816 0.812 0.829 0.806 4.0
Logit log odds, joint 0.815 0.812 0.827 0.804 3.6
Logit marginal effects, joint 0.814 0.810 0.828 0.805 24.6
Logit log odds, univariate 0.814 0.809 0.828 0.805 4.2
sklearn Target 0.813 0.804 0.828 0.806 0.7
Logit coefficients, univariate 0.813 0.809 0.826 0.803 4.4
Logit marginal effects, univariate 0.812 0.807 0.828 0.801 4.7
CatBoost 0.811 0.806 0.825 0.801 1.5
Gray 0.799 0.764 0.822 0.811 1.6
Binary 0.794 0.760 0.817 0.806 1.6
BaseN 0.794 0.760 0.817 0.806 1.7
WOE 0.794 0.777 0.811 0.792 1.3
Count 0.791 0.747 0.822 0.804 2.0
Ordinal 0.783 0.730 0.815 0.803 0.9
Target 0.769 0.764 0.767 0.776 1.8
CountTarget 0.769 0.764 0.767 0.776 2.2
MEstimate 0.757 0.750 0.752 0.769 1.7
Summary 0.755 0.741 0.776 0.747 5.2
JamesStein 0.746 0.748 0.725 0.766 1.9
Quantile 0.736 0.714 0.759 0.735 2.2
Hashing 0.731 0.695 0.761 0.737 3.1
LeaveOneOut 0.621 0.792 0.506 0.565 1.9

LogitEncoder settings

The mean AUC of the LogitEncoder settings with each encoding, model, and backend. Encodings and models are compared with the sklearn backend on all of the datasets; backends are compared only where both ran the same setting on the same dataset.

Encoding Mean AUC Logistic regression Gradient boosting Random forest
log odds 0.848 0.838 0.857 0.850
coefficients 0.848 0.838 0.855 0.850
marginal effects 0.847 0.837 0.855 0.849
Model Mean AUC Logistic regression Gradient boosting Random forest
joint 0.850 0.844 0.856 0.850
univariate 0.846 0.832 0.856 0.850
Backend Mean AUC Logistic regression Gradient boosting Random forest
sklearn 0.857 0.846 0.863 0.863
statsmodels 0.857 0.846 0.862 0.863

Uncertainty columns

The change in AUC from return_uncertainty = True (which adds each value's standard error and each category's count), on each dataset.

Setting Classifier Higher AUC Mean change Largest gain Largest loss
Logit log odds, joint Logistic regression 3 of 13 -0.003 +0.001 -0.017
Logit log odds, joint Gradient boosting 4 of 13 -0.002 +0.024 -0.039
Logit log odds, joint Random forest 5 of 13 -0.002 +0.017 -0.032
Logit log odds, univariate Logistic regression 6 of 13 +0.009 +0.142 -0.014
Logit log odds, univariate Gradient boosting 3 of 13 -0.003 +0.005 -0.022
Logit log odds, univariate Random forest 5 of 13 -0.004 +0.012 -0.031

Best LogitEncoder against the best category_encoders encoder

The best LogitEncoder setting beats the best category_encoders encoder in 15 of 39 dataset and classifier pairs (and ties in 6), with a median difference of 0.000 AUC. Picking the best of 14 settings after the fact flatters LogitEncoder, just as picking the best of 23 encoders flatters category_encoders.

Each dataset and classifier
Dataset Classifier Best LogitEncoder AUC Best category_encoders AUC Difference
tic-tac-toe Gradient boosting Logit log odds, joint 0.999 Count 1.000 -0.001
tic-tac-toe Logistic regression Logit log odds, joint 0.998 Hashing 0.998 0.000
tic-tac-toe Random forest Logit log odds, joint 0.998 MultiHot 0.999 -0.001
credit-approval Gradient boosting Logit log odds, joint + uncertainty 0.936 Polynomial 0.930 +0.006
credit-approval Logistic regression Logit log odds, univariate + uncertainty 0.928 Gray 0.928 0.000
credit-approval Random forest Logit log odds, univariate + uncertainty 0.934 Gray 0.934 0.000
credit-g Gradient boosting Logit log odds, joint + uncertainty 0.786 Helmert 0.789 -0.003
credit-g Logistic regression Logit coefficients, univariate 0.779 RankHot 0.790 -0.011
credit-g Random forest Logit marginal effects, univariate (statsmodels) 0.789 MultiHot 0.798 -0.009
dresses-sales Gradient boosting Logit log odds, joint 0.614 WOE 0.615 -0.001
dresses-sales Logistic regression Logit log odds, univariate 0.647 GLMM 0.657 -0.010
dresses-sales Random forest Logit marginal effects, univariate 0.644 GLMM 0.645 -0.001
colic Gradient boosting Logit log odds, joint + uncertainty 0.910 WOE 0.918 -0.008
colic Logistic regression Logit marginal effects, univariate 0.895 Summary 0.913 -0.018
colic Random forest Logit log odds, univariate + uncertainty 0.916 Summary 0.930 -0.014
churn Gradient boosting Logit log odds, joint 0.929 Gray 0.928 +0.001
churn Logistic regression Logit log odds, joint 0.862 CatBoost 0.857 +0.005
churn Random forest Logit marginal effects, joint (statsmodels) 0.923 WOE 0.920 +0.003
telco-churn Gradient boosting Logit log odds, joint (statsmodels) 0.839 CountTarget 0.837 +0.002
telco-churn Logistic regression Logit log odds, univariate 0.846 WOE 0.846 0.000
telco-churn Random forest Logit log odds, univariate 0.838 CatBoost 0.832 +0.006
speed-dating Gradient boosting Logit marginal effects, joint 0.868 Quantile 0.870 -0.002
speed-dating Logistic regression Logit log odds, joint 0.850 Ordinal 0.851 -0.001
speed-dating Random forest Logit coefficients, joint 0.858 Gray 0.860 -0.002
adult Gradient boosting Logit log odds, joint (statsmodels) 0.926 MEstimate 0.925 +0.001
adult Logistic regression Logit log odds, joint + uncertainty 0.908 BackwardDifference 0.908 0.000
adult Random forest Logit log odds, joint (statsmodels) 0.913 CatBoost 0.910 +0.003
bank-marketing Gradient boosting Logit marginal effects, joint 0.929 Polynomial 0.932 -0.003
bank-marketing Logistic regression Logit marginal effects, joint (statsmodels) 0.905 Polynomial 0.905 0.000
bank-marketing Random forest Logit coefficients, joint (statsmodels) 0.925 Helmert 0.926 -0.001
amazon Gradient boosting Logit log odds, univariate + uncertainty 0.834 CatBoost 0.827 +0.007
amazon Logistic regression Logit log odds, joint + uncertainty 0.842 CatBoost 0.826 +0.016
amazon Random forest Logit log odds, univariate + uncertainty 0.820 Gray 0.829 -0.009
kick Gradient boosting Logit log odds, joint + uncertainty 0.760 Gray 0.761 -0.001
kick Logistic regression Logit log odds, univariate + uncertainty 0.766 CatBoost 0.763 +0.003
kick Random forest Logit log odds, joint + uncertainty 0.745 Gray 0.743 +0.002
kdd-upselling Gradient boosting Logit log odds, univariate 0.860 Count 0.857 +0.003
kdd-upselling Logistic regression Logit log odds, joint 0.795 Count 0.793 +0.002
kdd-upselling Random forest Logit log odds, joint + uncertainty 0.829 CatBoost 0.814 +0.015

AUC on each dataset

Mean AUC over the five folds. The best on each dataset is in bold, and "—" marks a skipped or failed run. Encoders are listed from highest to lowest mean AUC over the datasets they ran on. Click a classifier to open its tables.

AUC with logistic regression

Smaller datasets

Encoder tic-tac-toe credit-approval credit-g dresses-sales colic churn telco-churn
Logit coefficients, joint 0.998 0.927 0.778 0.636 0.873 0.861 0.845
Logit coefficients, joint (statsmodels) 0.998 0.927 0.778 0.636 0.873 0.861 0.845
Logit marginal effects, joint (statsmodels) 0.991 0.927 0.779 0.639 0.873 0.862 0.845
Logit marginal effects, joint 0.991 0.927 0.779 0.638 0.873 0.862 0.845
Logit log odds, joint 0.998 0.927 0.774 0.637 0.870 0.862 0.845
Logit log odds, joint (statsmodels) 0.998 0.927 0.774 0.636 0.870 0.862 0.845
RankHot 0.990 0.923 0.790 0.631 0.865 0.852 0.845
BackwardDifference 0.992 0.921 0.788 0.627 0.862 0.854 0.845
Logit log odds, univariate + uncertainty 0.962 0.928 0.777 0.635 0.878 0.859 0.845
Logit log odds, joint + uncertainty 0.993 0.923 0.774 0.619 0.866 0.860 0.844
Polynomial 0.994 0.920 0.789 0.623 0.851 0.852 0.845
Sum 0.992 0.918 0.788 0.625 0.851 0.852 0.845
Helmert 0.994 0.919 0.788 0.611 0.849 0.852 0.845
Gray 0.990 0.928 0.782 0.632 0.862 0.818 0.845
MultiHot 0.995 0.918 0.788 0.612 0.844 0.851 0.845
OneHot 0.995 0.918 0.788 0.612 0.844 0.851 0.845
BaseN 0.995 0.920 0.782 0.625 0.832 0.829 0.845
Binary 0.995 0.920 0.782 0.625 0.832 0.829 0.845
GLMM 0.825 0.926 0.788 0.657 0.888 0.856 0.846
Logit coefficients, univariate (statsmodels) 0.820 0.927 0.779 0.646 0.894 0.861 0.846
Logit coefficients, univariate 0.820 0.927 0.779 0.646 0.894 0.861 0.846
Logit log odds, univariate (statsmodels) 0.820 0.927 0.779 0.647 0.892 0.861 0.846
Logit log odds, univariate 0.820 0.927 0.779 0.647 0.892 0.861 0.846
WOE 0.821 0.925 0.786 0.648 0.893 0.853 0.846
Logit marginal effects, univariate (statsmodels) 0.819 0.927 0.777 0.647 0.895 0.861 0.845
Logit marginal effects, univariate 0.819 0.927 0.777 0.647 0.895 0.861 0.845
Target 0.818 0.925 0.787 0.647 0.886 0.851 0.845
CountTarget 0.819 0.926 0.788 0.647 0.883 0.850 0.846
MEstimate 0.818 0.925 0.783 0.631 0.890 0.855 0.845
sklearn Target 0.819 0.927 0.776 0.620 0.899 0.860 0.845
JamesStein 0.818 0.924 0.782 0.607 0.887 0.853 0.845
CatBoost 0.745 0.924 0.761 0.635 0.909 0.857 0.844
LeaveOneOut 0.816 0.872 0.762 0.619 0.895 0.851 0.806
Summary 0.654 0.919 0.777 0.538 0.913 0.857 0.844
Hashing 0.998 0.883 0.705 0.627 0.713 0.726 0.830
Ordinal 0.731 0.919 0.721 0.568 0.863 0.818 0.844
Quantile 0.671 0.926 0.681 0.640 0.885 0.744 0.813
Count 0.594 0.913 0.724 0.551 0.846 0.811 0.844

Larger datasets

Encoder speed-dating adult bank-marketing amazon kick kdd-upselling
Logit log odds, joint (statsmodels) 0.850 0.907 0.904 — — —
Logit marginal effects, joint (statsmodels) 0.848 0.907 0.905 — — —
Logit coefficients, joint (statsmodels) 0.849 0.907 0.904 — — —
BackwardDifference 0.846 0.908 0.905 — — —
RankHot 0.843 0.908 0.905 — — —
Polynomial 0.843 0.908 0.905 — — —
Sum 0.832 0.908 0.905 — — —
OneHot 0.825 0.907 0.905 — — —
MultiHot 0.825 0.907 0.905 — — —
Helmert 0.824 0.907 0.905 — — —
Logit coefficients, univariate (statsmodels) 0.845 0.904 0.903 — 0.762 —
Logit log odds, univariate (statsmodels) 0.845 0.904 0.903 — 0.762 —
Logit marginal effects, univariate (statsmodels) 0.843 0.903 0.903 — 0.763 —
GLMM 0.839 0.904 0.902 — 0.748 —
Logit log odds, joint 0.850 0.907 0.904 0.840 0.764 0.795
Logit log odds, joint + uncertainty 0.849 0.908 0.903 0.842 0.765 0.794
Logit coefficients, joint 0.849 0.907 0.904 0.840 0.764 0.795
Logit marginal effects, joint 0.848 0.907 0.905 0.835 0.763 0.794
Logit log odds, univariate + uncertainty 0.846 0.906 0.901 0.835 0.766 0.793
Logit coefficients, univariate 0.845 0.904 0.903 0.834 0.762 0.794
Logit log odds, univariate 0.845 0.904 0.903 0.834 0.762 0.794
Logit marginal effects, univariate 0.843 0.903 0.903 0.828 0.763 0.793
CatBoost 0.843 0.903 0.903 0.826 0.763 0.792
sklearn Target 0.843 0.904 0.903 0.820 0.763 0.791
LeaveOneOut 0.793 0.904 0.903 0.822 0.763 0.789
WOE 0.839 0.904 0.902 0.780 0.747 0.742
Target 0.838 0.904 0.903 0.819 0.748 0.651
Gray 0.848 0.900 0.904 0.661 0.762 0.786
CountTarget 0.839 0.904 0.902 0.820 0.746 0.649
BaseN 0.849 0.899 0.896 0.642 0.760 0.790
Binary 0.849 0.899 0.896 0.642 0.760 0.790
MEstimate 0.838 0.904 0.903 0.798 0.739 0.627
JamesStein 0.832 0.904 0.903 0.794 0.725 0.640
Count 0.849 0.884 0.876 0.596 0.750 0.793
Summary 0.847 0.902 0.880 0.729 0.738 0.648
Ordinal 0.851 0.882 0.886 0.542 0.739 0.790
Quantile 0.844 0.828 0.859 0.617 0.745 0.651
Hashing 0.844 0.878 0.868 0.527 0.693 0.716
AUC with gradient boosting

Smaller datasets

Encoder tic-tac-toe credit-approval credit-g dresses-sales colic churn telco-churn
WOE 0.999 0.928 0.779 0.615 0.918 0.922 0.837
Logit log odds, univariate 0.986 0.928 0.786 0.613 0.904 0.926 0.836
Polynomial 0.999 0.930 0.789 0.593 0.913 0.918 0.833
GLMM 0.999 0.928 0.783 0.607 0.898 0.922 0.837
MEstimate 0.999 0.927 0.787 0.600 0.903 0.921 0.837
Logit log odds, joint 0.999 0.929 0.778 0.614 0.886 0.929 0.838
Logit log odds, univariate (statsmodels) 0.986 0.928 0.786 0.612 0.897 0.925 0.836
sklearn Target 0.984 0.928 0.785 0.591 0.920 0.925 0.837
Logit log odds, joint (statsmodels) 0.999 0.929 0.779 0.606 0.891 0.924 0.839
Logit coefficients, joint 0.997 0.930 0.771 0.609 0.894 0.927 0.838
JamesStein 0.999 0.929 0.787 0.597 0.898 0.919 0.837
CountTarget 0.999 0.928 0.788 0.578 0.915 0.921 0.837
Target 0.999 0.928 0.788 0.578 0.915 0.921 0.837
Logit marginal effects, univariate 0.986 0.927 0.781 0.609 0.900 0.925 0.837
Logit marginal effects, univariate (statsmodels) 0.986 0.927 0.781 0.609 0.900 0.923 0.837
Logit coefficients, joint (statsmodels) 0.997 0.930 0.771 0.609 0.889 0.924 0.838
Count 1.000 0.926 0.773 0.601 0.895 0.926 0.834
OneHot 0.999 0.928 0.786 0.583 0.904 0.918 0.835
MultiHot 0.999 0.928 0.786 0.583 0.904 0.918 0.835
Sum 0.999 0.928 0.786 0.583 0.904 0.918 0.835
Logit log odds, joint + uncertainty 0.996 0.936 0.786 0.575 0.910 0.913 0.837
Logit coefficients, univariate (statsmodels) 0.987 0.927 0.774 0.610 0.889 0.926 0.838
Logit marginal effects, joint 0.998 0.929 0.777 0.592 0.889 0.927 0.837
Gray 1.000 0.929 0.782 0.580 0.895 0.928 0.834
RankHot 1.000 0.925 0.783 0.589 0.889 0.926 0.834
Logit coefficients, univariate 0.987 0.927 0.774 0.606 0.889 0.925 0.838
Logit marginal effects, joint (statsmodels) 0.998 0.929 0.774 0.589 0.891 0.926 0.837
Ordinal 1.000 0.927 0.785 0.575 0.897 0.927 0.834
BackwardDifference 1.000 0.927 0.785 0.571 0.895 0.927 0.834
Logit log odds, univariate + uncertainty 0.964 0.932 0.785 0.601 0.903 0.920 0.834
Helmert 0.999 0.929 0.789 0.557 0.902 0.924 0.836
BaseN 0.998 0.927 0.779 0.573 0.864 0.926 0.836
Binary 0.998 0.927 0.779 0.573 0.864 0.926 0.836
Hashing 0.998 0.898 0.743 0.579 0.764 0.837 0.831
CatBoost 0.623 0.927 0.772 0.609 0.916 0.924 0.836
Summary 0.654 0.923 0.776 0.564 0.909 0.925 0.834
Quantile 0.671 0.924 0.688 0.593 0.886 0.810 0.814
LeaveOneOut 0.493 0.692 0.495 0.533 0.487 0.609 0.504

Larger datasets

Encoder speed-dating adult bank-marketing amazon kick kdd-upselling
Polynomial — 0.924 0.932 — — —
OneHot 0.869 0.925 0.931 — — —
MultiHot 0.869 0.925 0.931 — — —
Sum 0.869 0.925 0.931 — — —
Helmert 0.869 0.924 0.931 — — —
BackwardDifference 0.869 0.924 0.929 — — —
RankHot 0.869 0.925 0.928 — — —
Logit coefficients, joint (statsmodels) 0.867 0.925 0.928 — — —
Logit marginal effects, joint (statsmodels) 0.866 0.925 0.928 — — —
Logit log odds, joint (statsmodels) 0.864 0.926 0.928 — — —
Logit log odds, univariate (statsmodels) 0.867 0.925 0.927 — 0.756 —
Logit marginal effects, univariate (statsmodels) 0.867 0.924 0.925 — 0.759 —
Logit coefficients, univariate (statsmodels) 0.867 0.924 0.925 — 0.756 —
GLMM 0.858 0.925 0.928 — 0.747 —
Logit coefficients, joint 0.867 0.925 0.928 0.833 0.759 0.859
Logit log odds, univariate + uncertainty 0.867 0.925 0.925 0.834 0.757 0.858
sklearn Target 0.867 0.926 0.926 0.830 0.757 0.858
Logit marginal effects, joint 0.868 0.924 0.929 0.828 0.758 0.857
Logit log odds, joint 0.866 0.925 0.928 0.827 0.757 0.859
Logit log odds, univariate 0.865 0.925 0.927 0.829 0.757 0.860
Logit log odds, joint + uncertainty 0.865 0.924 0.928 0.826 0.760 0.858
Logit marginal effects, univariate 0.867 0.924 0.925 0.827 0.759 0.858
Logit coefficients, univariate 0.867 0.924 0.925 0.826 0.756 0.853
CatBoost 0.860 0.923 0.923 0.827 0.755 0.857
Gray 0.870 0.924 0.929 0.805 0.761 0.853
Count 0.869 0.924 0.929 0.801 0.760 0.857
BaseN 0.868 0.924 0.927 0.787 0.760 0.854
Binary 0.868 0.924 0.927 0.787 0.760 0.854
Ordinal 0.869 0.924 0.929 0.777 0.760 0.855
WOE 0.855 0.925 0.929 0.822 0.749 0.821
Summary 0.865 0.924 0.904 0.732 0.736 0.772
CountTarget 0.862 0.925 0.929 0.798 0.739 0.669
Target 0.862 0.925 0.929 0.798 0.739 0.669
Hashing 0.867 0.915 0.911 0.606 0.718 0.852
MEstimate 0.841 0.925 0.929 0.785 0.719 0.663
Quantile 0.870 0.868 0.894 0.620 0.745 0.802
JamesStein 0.839 0.925 0.929 0.740 0.708 0.611
LeaveOneOut 0.500 0.497 0.438 0.586 0.436 0.502
AUC with random forest

Smaller datasets

Encoder tic-tac-toe credit-approval credit-g dresses-sales colic churn telco-churn
WOE 0.999 0.932 0.794 0.636 0.922 0.920 0.827
GLMM 0.999 0.931 0.793 0.645 0.911 0.919 0.827
sklearn Target 0.982 0.932 0.792 0.631 0.929 0.920 0.836
MEstimate 0.999 0.932 0.795 0.630 0.919 0.918 0.827
JamesStein 0.999 0.932 0.791 0.631 0.918 0.918 0.827
Logit log odds, univariate (statsmodels) 0.979 0.933 0.789 0.640 0.914 0.922 0.838
Logit log odds, univariate 0.979 0.933 0.789 0.640 0.914 0.922 0.838
Target 0.999 0.932 0.797 0.611 0.918 0.918 0.827
CountTarget 0.999 0.932 0.797 0.611 0.918 0.918 0.827
Logit coefficients, joint (statsmodels) 0.998 0.928 0.783 0.632 0.908 0.919 0.833
Logit marginal effects, univariate 0.971 0.931 0.789 0.644 0.915 0.914 0.834
Logit marginal effects, univariate (statsmodels) 0.971 0.931 0.789 0.644 0.915 0.914 0.834
Logit coefficients, joint 0.998 0.928 0.782 0.628 0.909 0.920 0.834
Logit coefficients, univariate (statsmodels) 0.974 0.932 0.788 0.640 0.914 0.916 0.832
Logit coefficients, univariate 0.974 0.932 0.788 0.639 0.914 0.917 0.832
OneHot 0.999 0.933 0.798 0.612 0.910 0.917 0.822
Logit marginal effects, joint (statsmodels) 0.997 0.929 0.777 0.623 0.907 0.923 0.835
Logit marginal effects, joint 0.997 0.929 0.776 0.623 0.907 0.922 0.835
Logit log odds, joint 0.998 0.928 0.789 0.596 0.915 0.918 0.838
Logit log odds, joint (statsmodels) 0.998 0.928 0.787 0.598 0.914 0.918 0.837
MultiHot 0.999 0.934 0.798 0.592 0.906 0.917 0.822
Sum 0.999 0.931 0.785 0.611 0.903 0.913 0.825
Polynomial 0.999 0.924 0.790 0.598 0.924 0.907 0.823
Logit log odds, univariate + uncertainty 0.949 0.934 0.780 0.623 0.916 0.920 0.834
Count 0.995 0.930 0.789 0.567 0.906 0.917 0.827
Ordinal 0.996 0.927 0.788 0.577 0.897 0.915 0.827
Logit log odds, joint + uncertainty 0.966 0.929 0.776 0.602 0.900 0.918 0.836
Helmert 0.996 0.927 0.792 0.570 0.896 0.915 0.824
Gray 0.988 0.934 0.781 0.569 0.899 0.915 0.823
RankHot 0.985 0.930 0.797 0.563 0.889 0.912 0.822
BackwardDifference 0.994 0.924 0.773 0.566 0.889 0.917 0.826
BaseN 0.998 0.928 0.776 0.562 0.887 0.913 0.822
Binary 0.998 0.928 0.776 0.562 0.887 0.913 0.822
Hashing 0.998 0.900 0.741 0.562 0.766 0.825 0.812
Summary 0.654 0.929 0.780 0.513 0.930 0.916 0.823
CatBoost 0.413 0.930 0.768 0.631 0.910 0.919 0.832
Quantile 0.671 0.928 0.704 0.608 0.900 0.804 0.777
LeaveOneOut 0.614 0.790 0.546 0.533 0.800 0.853 0.496

Larger datasets

Encoder speed-dating adult bank-marketing amazon kick kdd-upselling
Logit log odds, joint (statsmodels) 0.856 0.913 0.924 — — —
Logit coefficients, joint (statsmodels) 0.856 0.909 0.925 — — —
Logit marginal effects, joint (statsmodels) 0.857 0.909 0.925 — — —
MultiHot 0.860 0.901 0.925 — — —
Sum 0.859 0.901 0.926 — — —
OneHot 0.859 0.900 0.925 — — —
Helmert 0.858 0.898 0.926 — — —
BackwardDifference 0.854 0.896 0.925 — — —
RankHot 0.856 0.895 0.923 — — —
Polynomial 0.849 0.891 0.924 — — —
Logit log odds, univariate (statsmodels) 0.857 0.912 0.924 — 0.741 —
Logit coefficients, univariate (statsmodels) 0.858 0.909 0.923 — 0.740 —
Logit marginal effects, univariate (statsmodels) 0.857 0.909 0.923 — 0.738 —
GLMM 0.858 0.906 0.925 — 0.737 —
Logit log odds, joint + uncertainty 0.851 0.911 0.922 0.820 0.745 0.829
Gray 0.860 0.902 0.926 0.829 0.743 0.811
Logit log odds, univariate + uncertainty 0.854 0.911 0.921 0.820 0.743 0.821
sklearn Target 0.858 0.913 0.924 0.812 0.741 0.814
Logit coefficients, joint 0.858 0.909 0.925 0.811 0.742 0.813
Logit log odds, univariate 0.857 0.912 0.924 0.809 0.739 0.815
Logit log odds, joint 0.856 0.913 0.924 0.806 0.744 0.812
Logit marginal effects, joint 0.855 0.909 0.924 0.813 0.745 0.809
Count 0.855 0.903 0.926 0.815 0.741 0.806
BaseN 0.856 0.901 0.924 0.818 0.736 0.812
Binary 0.856 0.901 0.924 0.818 0.736 0.812
Logit coefficients, univariate 0.858 0.909 0.923 0.808 0.740 0.808
Ordinal 0.860 0.904 0.925 0.796 0.741 0.813
Logit marginal effects, univariate 0.857 0.909 0.923 0.803 0.739 0.805
CatBoost 0.852 0.910 0.919 0.803 0.736 0.814
WOE 0.858 0.905 0.925 0.801 0.737 0.773
Target 0.857 0.906 0.926 0.780 0.733 0.734
CountTarget 0.857 0.906 0.926 0.780 0.733 0.733
MEstimate 0.856 0.906 0.926 0.762 0.732 0.727
JamesStein 0.856 0.906 0.926 0.747 0.734 0.728
Summary 0.848 0.903 0.894 0.700 0.728 0.713
Hashing 0.848 0.893 0.904 0.601 0.701 0.798
Quantile 0.851 0.822 0.879 0.619 0.731 0.737
LeaveOneOut 0.500 0.637 0.519 0.643 0.613 0.504

Skipped runs

Encoders that were skipped or failed
Dataset Encoder Status Message
speed-dating Polynomial error ValueError: window shape cannot be larger than input array shape
amazon BackwardDifference skipped 13,059 columns (limit 1,000)
amazon GLMM skipped 5,801 dummies in a dense model (limit 1,000)
amazon Helmert skipped 13,059 columns (limit 1,000)
amazon Logit coefficients, joint (statsmodels) skipped 13,059 dummies in a dense model (limit 1,000)
amazon Logit coefficients, univariate (statsmodels) skipped 5,801 dummies in a dense model (limit 1,000)
amazon Logit log odds, joint (statsmodels) skipped 13,059 dummies in a dense model (limit 1,000)
amazon Logit log odds, univariate (statsmodels) skipped 5,801 dummies in a dense model (limit 1,000)
amazon Logit marginal effects, joint (statsmodels) skipped 13,059 dummies in a dense model (limit 1,000)
amazon Logit marginal effects, univariate (statsmodels) skipped 5,801 dummies in a dense model (limit 1,000)
amazon MultiHot skipped 13,059 columns (limit 1,000)
amazon OneHot skipped 13,059 columns (limit 1,000)
amazon Polynomial skipped 13,059 columns (limit 1,000)
amazon RankHot skipped 13,059 columns (limit 1,000)
amazon Sum skipped 13,059 columns (limit 1,000)
kick BackwardDifference skipped 1,932 columns (limit 1,000)
kick Helmert skipped 1,932 columns (limit 1,000)
kick Logit coefficients, joint (statsmodels) skipped 1,932 dummies in a dense model (limit 1,000)
kick Logit log odds, joint (statsmodels) skipped 1,932 dummies in a dense model (limit 1,000)
kick Logit marginal effects, joint (statsmodels) skipped 1,932 dummies in a dense model (limit 1,000)
kick MultiHot skipped 1,932 columns (limit 1,000)
kick OneHot skipped 1,932 columns (limit 1,000)
kick Polynomial skipped 1,932 columns (limit 1,000)
kick RankHot skipped 1,932 columns (limit 1,000)
kick Sum skipped 1,932 columns (limit 1,000)
kdd-upselling BackwardDifference skipped 42,348 columns (limit 1,000)
kdd-upselling GLMM skipped 8,348 dummies in a dense model (limit 1,000)
kdd-upselling Helmert skipped 42,348 columns (limit 1,000)
kdd-upselling Logit coefficients, joint (statsmodels) skipped 42,348 dummies in a dense model (limit 1,000)
kdd-upselling Logit coefficients, univariate (statsmodels) skipped 8,348 dummies in a dense model (limit 1,000)
kdd-upselling Logit log odds, joint (statsmodels) skipped 42,348 dummies in a dense model (limit 1,000)
kdd-upselling Logit log odds, univariate (statsmodels) skipped 8,348 dummies in a dense model (limit 1,000)
kdd-upselling Logit marginal effects, joint (statsmodels) skipped 42,348 dummies in a dense model (limit 1,000)
kdd-upselling Logit marginal effects, univariate (statsmodels) skipped 8,348 dummies in a dense model (limit 1,000)
kdd-upselling MultiHot skipped 42,348 columns (limit 1,000)
kdd-upselling OneHot skipped 42,348 columns (limit 1,000)
kdd-upselling Polynomial skipped 42,348 columns (limit 1,000)
kdd-upselling RankHot skipped 42,348 columns (limit 1,000)
kdd-upselling Sum skipped 42,348 columns (limit 1,000)