vc_013 · High-cardinality categorical encoding

Status: ✓ Passing · Last run: 2026-06-04T23:41:54 · Pipeline: v2 · History: 2/2 runs passed (100%)

What was tested

Entity-static binary classification with a high-cardinality categorical column (branch_code, ~200 distinct levels for n_entities=2000). usage_score is the actual planted driver; branch_code is uncorrelated with target. Catches a real customer-pain failure mode: pipelines that naively one-hot encode high-card columns explode the feature space (200+ binary columns from a single source field), corrupting downstream training. The v2 pipeline should handle this via frequency/target encoding, top-K + 'other', or by dropping the column at the signal gate. All three are acceptable; one-hot explosion is not.

What we planted in the data

What the system did

Top features by importance:

What we checked — all assertions passed

Status Assertion Detail
row_count_eq_n_entities training rows = 2000, expected = 2000
feature_count_below final feature count = 10 (≤ 30)
planted_feature_in_top_k_importance derivative(s) of usage_score in top 3: ['usage_score_raw', 'usage_score_minmax_by_branch', 'usage_score_centered_by_branch']
auc_in_band AUC = 0.925 inside band [0.70, 0.95]
no_pipeline_errors clean run

How this could have gone wrong

Why this case matters

High-cardinality categoricals are one of the top three customer-pain failure modes for ML pipelines (alongside leakage and panel fan-out). Without this case, "the pipeline handles real-world categorical data" is unverified — most synthetic test cases use low-cardinality segments (Enterprise/SMB/Mid) where naive one-hot is fine.

Reproducing

# from auto_insight_api/
python -m validation.v2 run vc_013 --pipeline v2 -v

← back to validation report