SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.09191 · NeurIPS · 2023

A benchmark of categorical encoders for binary classification

Federico Matteucci, Vadim Arzamasov, Klemens Böhm

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2307.09191.json · badge: /api/ran/2307.09191.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
DrCohomology/EncoderBenchmarking canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
get_disjoint_samples Ran
ran; our contract draft was wrong, not the code
DrCohomology/EncoderBenchmarking/src/utils.py
code served (permissive licence) · get_code("4adfcc2981cd3803")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create a simple set of objects to sample from
S = set(range(100))  # Set of 100 integers

# Define parameters
n_samples = 5
sample_size = 10
seed = 42
bootstrap = False

# Construct ARGS dictionary
ARGS = {
    'S': S,
    'n_samples': n_samples,
    'sample_size': sample_size,
    'seed': seed,
    'bootstrap': bootstrap
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_disjoint_samples_bootstrap Ran
ran, honoured the contract we drafted
DrCohomology/EncoderBenchmarking/src/utils.py
code served (permissive licence) · get_code("29cd9c8f26fb6da7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a set of integers to sample from
S = set(range(100))

# Define arguments for the function
ARGS = {
    "S": S,
    "n_samples": 5,
    "sample_size": 8,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_relation_properties Ran
ran, honoured the contract we drafted
DrCohomology/EncoderBenchmarking/src/relation_utils.py
code served (permissive licence) · get_code("d518a6dfbf88372e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a simple domination matrix that satisfies reflexivity
# A 3x3 matrix for testing
mat = np.array([
    [1, 1, 0],
    [0, 1, 1],
    [0, 0, 1]
], dtype=int)

ARGS = {
    'mat': mat
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
jaccard Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DrCohomology/EncoderBenchmarking/src/rank_metrics.py
code served (permissive licence) · get_code("e49275c800f47936")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create sample Series with index and values
col1 = pd.Series(
    data=[1, 2, 1, 3],
    index=['a', 'b', 'c', 'd']
)

col2 = pd.Series(
    data=[2, 1, 1, 3],
    index=['a', 'b', 'c', 'd']
)

ARGS = {
    'col1': col1,
    'col2': col2,
    'best': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
jaccard_best Ran
ran; our contract draft was wrong, not the code
DrCohomology/EncoderBenchmarking/src/rank_metrics.py
code served (permissive licence) · get_code("7dfb47f5f62d013d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create two pandas Series with index labels and numeric values
# The function finds items with min/max values and compares sets
col1 = pd.Series(
    [1, 2, 1, 3],
    index=['item_a', 'item_b', 'item_c', 'item_d']
)

col2 = pd.Series(
    [1, 3, 2, 1],
    index=['item_a', 'item_b', 'item_c', 'item_d']
)

ARGS = {
    'col1': col1,
    'col2': col2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
jaccard_worst Ran
ran; our contract draft was wrong, not the code
DrCohomology/EncoderBenchmarking/src/rank_metrics.py
code served (permissive licence) · get_code("4ceb6e77d5114710")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create sample Series objects for testing jaccard_worst
# Series with named indices and numeric values
col1 = pd.Series(
    data=[1, 2, 3, 4, 5],
    index=['a', 'b', 'c', 'd', 'e'],
    name='col1'
)

col2 = pd.Series(
    data=[2, 3, 1, 5, 4],
    index=['a', 'b', 'c', 'd', 'e'],
    name='col2'
)

ARGS = {
    'col1': col1,
    'col2': col2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rf2mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DrCohomology/EncoderBenchmarking/src/relation_utils.py
code served (permissive licence) · get_code("76f37f16642cd78c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small ranking array
# Rankings are typically integers or floats representing relative order/scores
r = np.array([3.0, 1.0, 2.0, 4.0])

ARGS = {
    'r': r,
    'kind': 'preference'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score2rf Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DrCohomology/EncoderBenchmarking/src/relation_utils.py
code served (permissive licence) · get_code("fb563aeae74088ce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Series. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import pandas as pd

# Create a simple pandas Series with numeric scores
score_data = pd.Series([0.5, 0.8, 0.3, 0.9, 0.6], index=['a', 'b', 'c', 'd', 'e'])

# Test with increasing=True (lower score = better rank)
score_increasing = score_data.copy()

# Test with increasing=False (higher score = better rank)
score_decreasing = score_data.copy()

# Test with missing values
score_with_missing = pd.Series([0.5, np.nan, 0.3, 0.9, 0.6], index=['a', 'b', 'c', 'd', 'e'])

# Test with all NaN values
score_all_nan = pd.Series([np.nan, np.nan, np.nan], index=['x', 'y', 'z'])

ARGS = {
    'score': score_increasing,
    'increasing': True,
    'impute_missing': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
smart_sort Ran
ran; our contract draft was wrong, not the code
DrCohomology/EncoderBenchmarking/src/utils.py
code served (permissive licence) · get_code("88a726d9b8653524")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a mock dataset class that has get_data() method
class MockDataset:
    def __init__(self, data_size):
        self.data_size = data_size
    
    def get_data(self):
        # Returns a tuple where first element is data with length data_size
        data = torch.randn(self.data_size, 4)
        return (data,)

# Create experiments - each is a tuple containing a dataset-like object
# We'll create experiments with different sizes to test the sorting logic
experiments = [
    (MockDataset(50),),      # experiment 0: small
    (MockDataset(500),),     # experiment 1: large
    (MockDataset(100),),     # experiment 2: medium
    (MockDataset(1000),),    # experiment 3: very large
    (MockDataset(75),),      # experiment 4: small-medium
]

ARGS = {
    'experiments': experiments,
    'num_small_per_large': 100,
    'random': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Categorical encoders transform categorical features into numerical representations that are indispensable for a wide range of machine learning models. Existing encoder benchmark studies lack generalizability because of their limited choice of 1. encoders, 2. experimental factors, and 3. datasets. Additionally, inconsistencies arise from the adoption of varying aggregation strategies. This paper is the most comprehensive benchmark of categorical encoders to date, including an extensive evaluation of 32 configurations of encoders from diverse families, with 48 combinations of experimental factors, and on 50 datasets. The study shows the profound influence of dataset selection, experimental factors, and aggregation strategies on the benchmark's conclusionsaspects disregarded in previous encoder benchmarks. Our code is available at https://github.com/DrCohomology/EncoderBenchmarking. This version of the paper is identical to the one accepted at the 37th Conference on Neural Information Processing Systems (NeurIPS 2023), Track on Datasets and Benchmarks. Preprint. Under review.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2307.09191")
get_code_for_paper("2307.09191")
have("2307.09191")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2307.09191.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2307.09191.svg)](https://syntology.ai/paper/2307.09191)

Connect an agent — have() is free.