<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Achyuta Nand Jha on Medium]]></title>
        <description><![CDATA[Stories by Achyuta Nand Jha on Medium]]></description>
        <link>https://medium.com/@anj26scorp?source=rss-6ffc14da0375------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xtYt_OKcv9sYiyMd.</url>
            <title>Stories by Achyuta Nand Jha on Medium</title>
            <link>https://medium.com/@anj26scorp?source=rss-6ffc14da0375------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:32:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anj26scorp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Building Model Monitoring From Scratch]]></title>
            <link>https://medium.com/@anj26scorp/stop-building-model-monitoring-from-scratch-06793050b330?source=rss-6ffc14da0375------2</link>
            <guid isPermaLink="false">https://medium.com/p/06793050b330</guid>
            <category><![CDATA[model-drift]]></category>
            <category><![CDATA[concept-drift]]></category>
            <category><![CDATA[data-drift]]></category>
            <category><![CDATA[statistical-significance]]></category>
            <category><![CDATA[monitoring-and-evaluation]]></category>
            <dc:creator><![CDATA[Achyuta Nand Jha]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 00:30:53 GMT</pubDate>
            <atom:updated>2026-06-08T00:30:53.969Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Note: The methods, decisions, and lessons here are from hands-on production experience. AI assisted with editing and code validation!</blockquote><p><strong>Reuse the CRISP-DM lifecycle you already know as a plug-and-play drift-detection engine</strong></p><p><em>A practitioner’s guide to catching feature drift and concept drift in regression, classification, and ranking models — with copy-paste Python snippets you can run and test.</em></p><figure><img alt="Two bell curves on dark navy background. Left shows a stable teal training distribution. Right shows the original position ghosted plus a shifted coral production distribution, with drift detected badge and key metrics." src="https://cdn-images-1.medium.com/max/1024/1*Xein2yMZ2NPq9Eaj07I64Q.png" /></figure><h3>1. Your model is decaying right now</h3><p>A rental-car ranking model I once owned drifted before it ever reached production. The deployment got deprioritized on the product roadmap, the trained model sat on the shelf for about six weeks, and when we finally circled back I ran the drift tests almost as an afterthought. Roughly a quarter of its input features had already moved. The model had not served a single live request, and it was already stale.</p><p>That is the uncomfortable thing about model decay: it does not wait for deployment, and nothing throws an exception when it happens. A model that scored a clean 90% AUC on last quarter’s validation set can quietly slide to 70% the moment a new product line launches, a regulation changes, or — as in my case — the calendar simply moves on without it. The model keeps returning confident-looking predictions. They are just increasingly wrong.</p><p>In production, that decay tends to surface as one of three symptoms:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tAcnNiiq1cZjGr44S-cYw.png" /><figcaption>Table 1 : Types of symptoms and implications</figcaption></figure><p>Discover any of these only after the damage is done and you are stuck firefighting: expensive, stressful, and usually too late. Continuous, automated monitoring is the safety net that says “something is moving — act before it hurts.” The good news is that you do not need a brand-new framework to build it.</p><h3>2. The shortcut: treat monitoring as a CRISP-DM loop</h3><p>CRISP-DM (Cross-Industry Standard Process for Data Mining) is the six-stage, iterative lifecycle most data teams already use to build models:</p><p>1. Business Understanding</p><p>2. Data Understanding</p><p>3. Data Preparation</p><p>4. Modeling</p><p>5. Evaluation</p><p>6. Deployment</p><p>The core idea here is that every monitoring cycle is just a mini CRISP-DM run executed against the live data stream instead of a static training set. Because each monitoring task maps one-to-one onto a stage you already know, the notebooks, pipelines, and governance artifacts you built during training drop straight into the monitoring loop — no parallel stack to maintain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cOTXQsI_w9O3-8t7UDxNHA.png" /><figcaption>Table 2: Mapping of CRISP-DM stages to Production steps</figcaption></figure><p>Because the loop is a reusable adaptation of CRISP-DM, onboarding a new model type — a forecaster, a recommender, an RL policy — only requires swapping in the right drift tests at the Evaluation stage. Everything around it stays put.</p><h3>3. Drift 101: feature drift vs. concept drift</h3><p>Two distinct things can go wrong, and confusing them is the most common monitoring mistake:</p><p><strong>Feature (data) drift: </strong>the distribution of the inputs P(X) changes — a new customer segment, a unit change in an upstream sensor, a catalog refresh. You can detect this without any labels, just by comparing input distributions.</p><p><strong>Concept drift: </strong>the relationship P(Y|X) changes — the same input now implies a different outcome. This shows up as performance degradation and, crucially, can only be confirmed once ground-truth labels arrive.</p><p><strong>A practical caveat worth stating up front: </strong>feature-drift tests are cheap and immediate, but performance and concept-drift tests need labels, and labels often arrive late (a refund three weeks later, a churn event next quarter). A robust monitor leans on feature drift as the early-warning tripwire and treats performance drift as the lagging confirmation.</p><p>I learned to trust that ordering the hard way. During those six weeks the rental-car model sat idle, there were no fresh labels to score it against — so a performance metric would have told me nothing. The input-distribution tests were the only thing that could have caught the rot while it was actually happening.</p><p>Here is the test cheat-sheet I reach for, organized by what you are actually monitoring:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OeY3Egq7URFgYDNTEBcDoQ.png" /><figcaption>Table 3: Mapping model objective to Drift tests</figcaption></figure><p><strong>Scaling tip: </strong>with hundreds of features, do not alert on each one. Aggregate into a single drift score (e.g., the median KS statistic or a summed PSI) and threshold on that. You catch systemic shifts while keeping alert fatigue low.</p><h3>4. Worked examples you can actually run</h3><p>Each example below is self-contained and reproducible: it fits a real model on a baseline “training era,” freezes it, then exposes it to a “current era” that contains genuine feature drift and concept drift. Every printed number comes from running the snippet with the seeds shown. The dependencies are just NumPy, SciPy, and scikit-learn.</p><h4>4.1 Regression — predicting house prices</h4><pre>import numpy as np<br>from scipy.stats import ks_2samp, mannwhitneyu<br>from sklearn.linear_model import LinearRegression<br><br>rng = np.random.default_rng(0)<br>n   = 2000<br><br># ---- Baseline era: fit and FREEZE a model -------------------------------<br>sqft_base = rng.normal(1500, 300, n)<br>age_base  = rng.exponential(30, n)<br>X_base = np.column_stack([sqft_base, age_base])<br>y_base = 50 + 0.15*sqft_base - 0.8*age_base + rng.normal(0, 12, n)<br>model = LinearRegression().fit(X_base, y_base)<br><br># ---- Current era: feature drift + concept drift -------------------------<br>sqft_cur = rng.normal(1650, 380, n)   # mean &amp; variance shift -&gt; feature drift<br>age_cur  = rng.exponential(30, n)<br>X_cur = np.column_stack([sqft_cur, age_cur])<br># market revalues space: sqft coefficient rises 0.15 -&gt; 0.16 (concept drift)<br>y_cur = 50 + 0.16*sqft_cur - 0.8*age_cur + rng.normal(0, 12, n)<br><br># 1) Feature drift -- KS per feature<br>for name, b, c in [(&quot;sqft&quot;, sqft_base, sqft_cur), (&quot;age&quot;, age_base, age_cur)]:<br>    s = ks_2samp(b, c)<br>    print(f&quot;KS {name:5s}: stat={s.statistic:.3f}  p={s.pvalue:.2e}&quot;)<br><br># 2) Metric drift -- frozen model error on each era<br>rmse_base = np.sqrt(np.mean((y_base - model.predict(X_base))**2))<br>rmse_cur  = np.sqrt(np.mean((y_cur  - model.predict(X_cur ))**2))<br>print(f&quot;RMSE baseline={rmse_base:.2f}  current={rmse_cur:.2f}&quot;)<br><br>err_base = np.abs(y_base - model.predict(X_base))<br>err_cur  = np.abs(y_cur  - model.predict(X_cur))<br>u = mannwhitneyu(err_base, err_cur, alternative=&quot;less&quot;)<br>print(f&quot;Error-shift test (Mann-Whitney) p={u.pvalue:.2e}&quot;)</pre><p><strong>What you’ll see (with seed 0):</strong></p><blockquote>• KS on sqft returns p ≈ 3e-40 — strong feature drift. KS on age returns p ≈ 0.77, correctly flagging it as stable. A good test must stay quiet when nothing moves.</blockquote><blockquote>• The frozen model’s RMSE nearly doubles, from 11.9 to 20.4, and the Mann-Whitney test on per-row errors returns a vanishingly small p-value — the errors genuinely grew.</blockquote><p><strong>Why an independent two-sample test, not a paired t-test?</strong></p><p>The baseline and current batches are different rows, not the same observations measured twice. A paired test would be statistically invalid here — a subtle bug that is easy to ship and hard to notice.</p><p><strong>Business impact: </strong>in a loan-underwriting or pricing pipeline, a 70% jump in estimation error can cause systematic mis-pricing and quietly accumulate risk on the balance sheet long before anyone notices the model is off.</p><h4>4.2 Classification — spam vs. ham</h4><pre>import numpy as np<br>from scipy.stats import ks_2samp, chi2_contingency<br>from sklearn.linear_model import LogisticRegression<br>from sklearn.metrics import roc_auc_score<br><br>rng = np.random.default_rng(1)<br>n = 4000<br><br># ---- Baseline: labels DEPEND on features; fit + freeze a classifier -----<br>num_links = rng.poisson(2, n)<br>has_html  = rng.binomial(1, 0.70, n)<br>word_cnt  = rng.normal(120, 30, n)<br>logit = -3.0 + 0.9*num_links + 1.4*has_html - 0.003*word_cnt<br>y_base = rng.binomial(1, 1/(1+np.exp(-logit)))<br>X_base = np.column_stack([num_links, has_html, word_cnt])<br>clf = LogisticRegression().fit(X_base, y_base)<br><br># ---- Current: feature drift + concept drift -----------------------------<br>num_links_c = rng.poisson(3, n)          # more links     -&gt; feature drift<br>has_html_c  = rng.binomial(1, 0.50, n)   # less HTML      -&gt; feature drift<br>word_cnt_c  = rng.normal(130, 35, n)<br># spam tactics evolve: links matter less, HTML matters more -&gt; concept drift<br>logit_c = -3.0 + 0.2*num_links_c + 2.6*has_html_c - 0.003*word_cnt_c<br>y_cur = rng.binomial(1, 1/(1+np.exp(-logit_c)))<br>X_cur = np.column_stack([num_links_c, has_html_c, word_cnt_c])<br><br># 1) Feature drift<br>print(f&quot;KS num_links     : p={ks_2samp(num_links, num_links_c).pvalue:.2e}&quot;)<br>def cat_counts(a, b):                    # proper 2 x K contingency of COUNTS<br>    cats = np.union1d(a, b)<br>    return np.array([[(a==k).sum() for k in cats],<br>                     [(b==k).sum() for k in cats]])<br>chi2, p, _, _ = chi2_contingency(cat_counts(has_html, has_html_c))<br>print(f&quot;Chi-square has_html: chi2={chi2:.1f}  p={p:.2e}&quot;)<br><br># 2) Metric drift -- frozen classifier<br>prob_base = clf.predict_proba(X_base)[:, 1]<br>prob_cur  = clf.predict_proba(X_cur )[:, 1]<br>auc_base = roc_auc_score(y_base, prob_base)<br>auc_cur  = roc_auc_score(y_cur,  prob_cur)<br>print(f&quot;AUC baseline={auc_base:.3f}  current={auc_cur:.3f}&quot;)<br><br>def boot_auc_delta(yb, pb, yc, pc, it=2000, seed=7):<br>    r = np.random.default_rng(seed)<br>    d = np.empty(it)<br>    for i in range(it):<br>        ib = r.integers(0, len(yb), len(yb))<br>        ic = r.integers(0, len(yc), len(yc))<br>        d[i] = roc_auc_score(yc[ic], pc[ic]) - roc_auc_score(yb[ib], pb[ib])<br>    return d.mean(), np.percentile(d, [2.5, 97.5])<br>delta, ci = boot_auc_delta(y_base, prob_base, y_cur, prob_cur)<br>print(f&quot;AUC delta={delta:.3f}  95% CI=[{ci[0]:.3f}, {ci[1]:.3f}]&quot;)</pre><p><strong>What you’ll see (with seed 1):</strong></p><blockquote>• KS on num_links and the chi-square on has_html both return tiny p-values — numeric and categorical feature drift, respectively.</blockquote><blockquote>• AUC drops about 11 points, from 0.80 to 0.69, and the bootstrap confidence interval on the change, roughly [-0.14, -0.09], excludes zero — statistically significant degradation.</blockquote><p><strong>Watch the categorical test. </strong>The right way to detect categorical drift is a 2×K contingency table of category counts (baseline vs. current), as cat_counts builds above. Cross-tabulating the two raw samples against each other — a tempting one-liner — silently fails to detect even an obvious 0.70 → 0.50 shift in the positive rate.</p><p><strong>Business impact: </strong>an 11-point AUC loss in a spam or fraud filter lets a meaningful slice of malicious traffic through, eroding trust and potentially tripping compliance obligations.</p><h3>4.3 Ranking — product recommendations (top-k)</h3><pre>import numpy as np<br>from scipy.stats import ks_2samp, kendalltau<br>from sklearn.metrics import ndcg_score<br><br>rng = np.random.default_rng(42)<br>n_users, n_items, d = 400, 60, 4<br>sig = lambda z: 1/(1+np.exp(-z))          # -&gt; non-negative graded relevance<br><br># ---- Baseline: a frozen linear scorer matched to the original catalog ---<br>w_model = np.array([1.0, 0.6, -0.4, 0.8])      # learned weights (frozen)<br>items_base = rng.normal(0.0, 1.0, (n_items, d))<br>score_base = items_base @ w_model              # 1 model score per item<br>true_base  = sig(items_base @ w_model + rng.normal(0, 0.4, (n_users, n_items)))<br>ndcg_base  = np.mean([ndcg_score([true_base[u]], [score_base], k=10)<br>                      for u in range(n_users)])<br><br># ---- Current: catalog shift (feature drift) + taste shift (concept drift)<br>items_cur = rng.normal(0.4, 1.3, (n_items, d))  # new catalog -&gt; feature drift<br>w_taste   = np.array([0.1, 1.4, -0.4, -0.5])    # tastes change -&gt; concept drift<br>score_cur = items_cur @ w_model                 # SAME frozen model, new catalog<br>true_cur  = sig(items_cur @ w_taste + rng.normal(0, 0.4, (n_users, n_items)))<br>ndcg_cur  = np.mean([ndcg_score([true_cur[u]], [score_cur], k=10)<br>                     for u in range(n_users)])<br><br># 1) Feature drift -- KS on the model&#39;s score distribution<br>ks = ks_2samp(score_base, score_cur)<br>print(f&quot;KS on model scores: stat={ks.statistic:.3f}  p={ks.pvalue:.2e}&quot;)<br># 2) Metric drift -- NDCG@10<br>print(f&quot;NDCG@10 baseline={ndcg_base:.3f}  current={ndcg_cur:.3f}&quot;)<br># 3) Ranking agreement -- Kendall tau between model order and true order<br>def order_tau(truth, scores):<br>    return kendalltau(scores, truth).statistic<br>tau_base = np.mean([order_tau(true_base[u], score_base) for u in range(n_users)])<br>tau_cur  = np.mean([order_tau(true_cur[u],  score_cur ) for u in range(n_users)])<br>print(f&quot;Kendall tau (model vs truth) baseline={tau_base:.3f}  current={tau_cur:.3f}&quot;)</pre><p><strong>What you’ll see (with seed 42):</strong></p><blockquote>• KS on the model’s score distribution flags the catalog shift (feature drift).</blockquote><blockquote>• NDCG@10 falls from 0.98 to 0.68 — a 31% relative drop — because the frozen scorer keeps ranking by yesterday’s notion of relevance while user tastes have moved on.</blockquote><blockquote>• Average Kendall τ between the model’s order and the true order collapses from 0.80 to 0.21: the recommendations are now barely correlated with what users actually want.</blockquote><p><strong>Business impact: </strong>a 30% NDCG drop on a storefront translates directly into lost clicks and revenue — especially when the trigger is a promotion or seasonal event that reshapes item popularity faster than the model can adapt.</p><p><em>This toy ranker is the sanitized cousin of the rental-car model from the opening — same failure mode, except that one managed to drift before it had served a single request.</em></p><h3>5. One number to watch: Population Stability Index</h3><p>Hypothesis tests answer “did it move?” but their p-values get tiny and uninformative at large sample sizes — with a million rows, almost any micro-shift is “significant.” The Population Stability Index (PSI) answers the more useful question: “how much did it move?” It is a single, sample-size-robust number with battle-tested thresholds, which is why it is a staple of credit-risk and production-ML monitoring.</p><pre>import numpy as np<br>def psi(baseline, current, bins=10):<br>  &quot;&quot;&quot;Population Stability Index between a baseline and a current sample.<br>  Rule of thumb: &lt;0.1 stable, 0.1–0.25 moderate shift, &gt;0.25 major shift.&quot;&quot;&quot;<br>  # fixed bin edges from the baseline distribution (quantile bins)<br>  edges = np.unique(np.quantile(baseline, np.linspace(0, 1, bins + 1)))<br>  edges[0], edges[-1] = -np.inf, np.inf<br>  base_pct = np.histogram(baseline, edges)[0] / len(baseline)<br>  cur_pct = np.histogram(current, edges)[0] / len(current)<br>  eps = 1e-6 # avoid div-by-zero / log(0)<br>  base_pct = np.clip(base_pct, eps, None)<br>  cur_pct = np.clip(cur_pct, eps, None)<br>  return np.sum((cur_pct - base_pct) * np.log(cur_pct / base_pct))<br>rng = np.random.default_rng(7)<br>baseline = rng.normal(50, 10, 5000)<br>stable = rng.normal(50, 10, 5000) # same distribution<br>shifted = rng.normal(56, 13, 5000) # mean + variance shift<br>print(f&quot;PSI (stable vs baseline) : {psi(baseline, stable):.3f}&quot;)<br>print(f&quot;PSI (shifted vs baseline): {psi(baseline, shifted):.3f}&quot;)</pre><p>The conventional reading: PSI below 0.10 means stable, 0.10–0.25 means a moderate shift worth watching, and above 0.25 means a major shift that usually warrants action. In the snippet above the stable sample scores 0.002 while the shifted one scores 0.34 — squarely in “investigate now” territory. Because PSI is a magnitude rather than a p-value, it is also what you graph on a dashboard and threshold an alert on.</p><h3>6. From noisy signals to confident alarms: rolling windows</h3><p>A single window can breach a threshold purely by chance, and one false alarm at 3 a.m. is all it takes for a team to start ignoring the monitor. The fix is to demand persistence: declare drift only after several consecutive windows agree. That converts a noisy per-batch signal into a confident, low-false-positive alarm — the difference between “a window looked odd” and “the distribution has genuinely shifted.”</p><p>The monitor below streams the data in fixed windows, runs a KS test against a frozen reference in each one, and only confirms drift after a configurable streak of breaches:</p><pre>import numpy as np<br>from scipy.stats import ks_2samp<br>rng = np.random.default_rng(11)<br># - - A reference window captured at training time - - - - - - - - - - - -<br>reference = rng.normal(0.0, 1.0, 1000)<br># - - A live stream: stable for a while, then drift sets in - - - - - - - <br>stream = np.concatenate([<br>rng.normal(0.0, 1.0, 3000), # batches 0–5: on-distribution<br>rng.normal(0.6, 1.2, 3000), # batches 6–11: drift begins<br>])<br>WINDOW = 500 # samples per rolling window<br>ALPHA = 0.01 # per-window significance level<br>CONFIRM_AFTER = 3 # consecutive breaches needed to confirm drift<br>streak, confirmed_at = 0, None<br>print(f&quot;{&#39;win&#39;:&gt;3} {&#39;KS&#39;:&gt;6} {&#39;p-value&#39;:&gt;10} {&#39;breach&#39;:&gt;7} {&#39;streak&#39;:&gt;7}&quot;)<br>for w, start in enumerate(range(0, len(stream) - WINDOW + 1, WINDOW)):<br>    window = stream[start:start + WINDOW]<br>    res = ks_2samp(reference, window)<br>    breach = res.pvalue &lt; ALPHA<br>    streak = streak + 1 if breach else 0<br>    if confirmed_at is None and streak &gt;= CONFIRM_AFTER:<br>        confirmed_at = w<br>    print(f&quot;{w:&gt;3} {res.statistic:&gt;6.3f} {res.pvalue:&gt;10.2e} &quot;<br>          f&quot;{str(breach):&gt;7} {streak:&gt;7}&quot;)<br> <br>print(f&quot;\nDrift CONFIRMED at window {confirmed_at} &quot;<br>      f&quot;({CONFIRM_AFTER} consecutive breaches at alpha={ALPHA}).&quot;)</pre><p><strong>What you’ll see (with seed 11):</strong></p><blockquote>• Windows 0–5, drawn from the reference distribution, stay well above the significance threshold — no false alarms, and the streak never leaves zero.</blockquote><blockquote>• From window 6 onward the data has shifted; breaches begin and the streak climbs.</blockquote><blockquote>• Drift is confirmed at window 8 — three consecutive breaches — not at the first noisy reading. Two knobs, the window size and the confirmation streak, let you trade detection latency against false-positive rate.</blockquote><p><strong>The same wrapper covers concept drift. </strong>Swap the per-window KS p-value for a per-window performance statistic — a bootstrap AUC delta or a rolling RMSE — and the identical “streak of breaches” logic gives you a confident concept-drift alarm the moment enough labels have accumulated.</p><h3>7. Stitching it into a pipeline</h3><p>Wire the pieces into a loop that any orchestrator — Airflow, Prefect, Dagster, Kubeflow — can run on a schedule:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xPy37Ej-A4AzhtAu7A_9aA.png" /></figure><p>The reusable artifacts that make this cheap to operate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2YYAQKMfvcGVMHFKYZAlg.png" /></figure><p>Because each block is self-contained, a data engineer can hand off a data-profiling notebook and a model owner plugs in their own evaluation module. The orchestrator just chains them together — no duplicated code, no reinvented wheels.</p><p><strong>A note on tooling: </strong>the snippets above are hand-rolled on purpose — they show the mechanics and keep you in control of every threshold. In production you rarely want to maintain that statistics code yourself. On my own monitoring platform I used <a href="https://github.com/evidentlyai/evidently"><strong>Evidently</strong></a> to generate the per-model feature- and concept-drift reports and the dashboards that went with them; it packages the same tests used here (KS, chi-square, PSI, and more) into ready-made visual reports. The neighbors are worth knowing too: NannyML estimates model performance when labels are delayed — the exact pain from the rental-car story — while whylogs, deepchecks, and river cover profiling, validation, and streaming. Whichever you choose, the CRISP-DM loop does not change; the library just fills in the Evaluation and Deployment stages, so you ship a tripwire instead of a maintenance burden.</p><h3>8. Takeaways</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w5u-eUUknMCwZdy5QP4REA.png" /></figure><h3>TL;DR</h3><p>Model monitoring does not have to be a bespoke framework. By recycling the proven CRISP-DM lifecycle, you get a plug-and-play engine that works across regression, classification, and ranking. Its core is a small set of statistical drift tests — KS, chi-square, PSI, bootstrap CIs, Kendall τ — that surface feature drift (immediately, label-free) and concept drift (once labels arrive). Wrap each test in a rolling window so you alert on sustained shifts, not noise. The investment is a handful of reusable scripts; the payoff is a data-driven guardrail that protects revenue, compliance, and trust every single day.</p><p><em>Try the CRISP-DM monitoring loop on your next production model. The code above is enough to start — run it, swap in your own data, and ship the tripwire before the model decays.</em></p><h3>About the Author</h3><p><em>I’m a Senior Machine Learning Engineer with over a decade of experience building and shipping ranking, recommendation, and monitoring systems in production. My work sits at the intersection of applied ML and platform reliability — from designing LLM evaluation frameworks to building the kind of drift-detection pipelines described in this article.</em></p><p><em>If something in here resonated, or you’ve hit a similar wall with a model decaying quietly in production, I’d love to connect.</em></p><p><em>→ </em><a href="https://www.linkedin.com/in/achyuta-nand-jha/"><em>LinkedIn</em></a></p><p><em>→ </em><a href="https://achyuta26.github.io/achyutanandjha/"><em>Portfolio</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06793050b330" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>