🌊  Categorical Drift

Categorical Drift#

Shifts in the distribution of categorical feature values over time.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

Categorical drift is a change over time in the distribution of categories between training and production data. It is a form of data drift that specifically affects categorical features rather than continuous ones.

What happens#

The frequency of categories shifts — if 80% of customers came from Region A in training but only 40% do in production, the feature has drifted. This hurts models trained on the old mix: predictions skew, once-rare categories become common, and entirely unseen categories can appear in production that the model never learned.

Detecting it#

Standard tools compare category frequencies. A chi-square test weighs observed against expected counts; Cramér’s V measures the strength of the shift; and the Population Stability Index (PSI) quantifies how much a categorical distribution has moved.

Where it bites#

The effects are concrete. In e-commerce, a recommender fails when new products dominate. In healthcare, a diagnosis model degrades as disease-code frequencies change. In finance, fraud detection weakens as transaction types (online, POS, crypto) shift — each a categorical drift the monitoring must catch.


Theme: Distribution Shift & Drift  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Categorical Drift (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: advanced