0Pricing
Deep Learning Academy · Lezione

Rilevare il drift dei dati e del modello

Rilevi quando il mondo intorno al modello cambia

Rilevare il drift dei dati e del modello è una lezione Deep Learning Academy gratuita su CoddyKit. Questa è la lezione 3 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Deep Learning Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Deep Learning Academy include 4 lezioni in totale.

Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.

The World Keeps Moving

Your model learned yesterday's patterns, but real data keeps changing. When it shifts, predictions quietly get worse. We call this problem drift. 🌊

Two Flavors of Drift

There are two kinds to watch. Data drift means the inputs change shape, while concept drift means the relationship between inputs and labels changes.

A Concrete Example

A spam filter trained on old emails sees new tricks it never met. The inputs drifted, so its once-sharp accuracy slowly decays in production.

Watch the Input Distribution

The first signal of drift is in the features. Compare the distribution of recent inputs to your training data and look for a shift in the shape.

ref_mean = X_train.mean(axis=0)
live_mean = X_live.mean(axis=0)

Measure the Gap

To quantify how far two distributions diverge, use a statistic like KS, the Kolmogorov-Smirnov test, which returns a number plus a p-value.

from scipy.stats import ks_2samp
stat, p = ks_2samp(X_train[:,0], X_live[:,0])

Set a Threshold

A small p-value means the live data no longer matches training. Pick a threshold and trigger an alert whenever the gap crosses it.

if p < 0.05:
    print("drift detected")

Watch Predictions Too

Even without labels, the spread of your model's outputs is a clue. A sudden shift in predicted probabilities often signals incoming drift.

The Best Signal Is Truth

When real labels eventually arrive, compare them to past predictions. Falling live accuracy is the clearest, most direct proof that drift is hurting you.

Tools That Watch for You

You need not build everything by hand. Libraries like Evidently compute drift reports across all features and flag the columns that moved.

from evidently.report import Report

Monitor Continuously

Drift is not a one-time check. Run these comparisons on a schedule so your monitoring catches slow shifts long before users complain.

Detection Is Half the Battle

Spotting drift early lets you act before damage spreads. The natural next move is to retrain on fresh data and restore the model's edge.

Quick Check

What does concept drift specifically describe?

Recap

You learned to spot drift: compare live inputs to training, measure the gap with tests, watch predictions, and monitor on a schedule. 🎉

Domande Frequenti

La lezione «Rilevare il drift dei dati e del modello» è gratuita?

Sì — il testo completo di «Rilevare il drift dei dati e del modello» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Deep Learning Academy, passa a CoddyKit PRO. Il corso Deep Learning Academy include 4 lezioni in totale.

Cosa imparerò in «Rilevare il drift dei dati e del modello»?

Rilevi quando il mondo intorno al modello cambia Eserciti Deep Learning Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.

Ho bisogno di esperienza per iniziare Deep Learning Academy?

Non è richiesta alcuna esperienza precedente. Deep Learning Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 3 di 4.

Quanto tempo richiede la lezione «Rilevare il drift dei dati e del modello»?

La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.

Posso scrivere ed eseguire codice in questa lezione Deep Learning Academy?

Sì. Ogni lezione Deep Learning Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.

Tutte le lezioni di questo corso

  1. Tracciare gli esperimenti con Weights & Biases
  2. Versionare dati e modelli
  3. Rilevare il drift dei dati e del modello
  4. Automatizzare le pipeline di riaddestramento
← Torna a Deep Learning Academy