🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
📝 **Task:** Build \`drift_detector(baseline_mean, current_mean, std, threshold)\` — returns \`True\` if the current feature mean has drifted significantly from baseline:
- Compute z-score: \`|current_mean - baseline_mean| / std\`.
- Return \`True\` if z-score \`>= threshold\` (drift), else \`False\` (stable).
- \`std == 0\` → return \`False\` (no spread → can't compute meaningful drift; flagging would be alert noise).
- This is the simplest production drift signal — runs nightly per feature.
📋 Implement the function above. Tests run automatically.
💡 **Hint:** Re-read the theory if you get stuck.
🎯 Quiz
Question
📝 **Task:** Build \`drift_detector(baseline_mean, current_mean, std, threshold)\` — returns \`True\` if the current feature mean has drifted significantly from baseline:
- Compute z-score: \`|current_mean - baseline_mean| / std\`.
- Return \`True\` if z-score \`>= threshold\` (drift), else \`False\` (stable).
- \`std == 0\` → return \`False\` (no spread → can't compute meaningful drift; flagging would be alert noise).
- This is the simplest production drift signal — runs nightly per feature.
📋 Implement the function above. Tests run automatically.
💡 **Hint:** Re-read the theory if you get stuck.