Detecte Deriva de Dados e de Modelo
Identifique quando o mundo muda sob seus pés
Detecte Deriva de Dados e de Modelo é uma aula grátis de Deep Learning Academy no CoddyKit. Esta é a aula 3 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Deep Learning Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Deep Learning Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
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 ReportMonitor 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. 🎉
Perguntas Frequentes
A aula “Detecte Deriva de Dados e de Modelo” é grátis?
Sim — o texto completo de “Detecte Deriva de Dados e de Modelo” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Deep Learning Academy, atualize para CoddyKit PRO. O curso de Deep Learning Academy inclui 4 aulas no total.
O que vou aprender em “Detecte Deriva de Dados e de Modelo”?
Identifique quando o mundo muda sob seus pés Você pratica Deep Learning Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Deep Learning Academy?
Nenhuma experiência prévia é necessária. Deep Learning Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 3 de 4.
Quanto tempo leva a aula “Detecte Deriva de Dados e de Modelo”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Deep Learning Academy?
Sim. Cada aula de Deep Learning Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Acompanhe Experimentos com Weights & Biases
- Versione Dados e Modelos
- Detecte Deriva de Dados e de Modelo
- Automatize Pipelines de Retreinamento