Verification before deployment.
WHAT TO TEST ABOUT THE CODE
Preprocessing, against known inputs and outputs Feature computation Postprocessing and thresholds The interface contract
WHAT TO TEST ABOUT THE MODEL
Performance on a held-out set Performance by segment Behaviour on edge cases Behaviour with missing features
WHAT A BEHAVIOURAL TEST IS
Asserting the model responds correctly to a specific kind of input.
WHAT EXAMPLES LOOK LIKE
An obviously positive case being predicted positive A small irrelevant change not altering the prediction A meaningful change altering it in the expected direction
WHY THOSE MATTER
They catch failures aggregate metrics never reveal.
WHAT INVARIANCE TESTING CHECKS
That irrelevant changes do not change the output.
WHAT DIRECTIONAL TESTING CHECKS
That relevant changes move the output correctly.
WHAT TO TEST BEFORE EVERY RELEASE
That the packaged model reproduces the evaluation results.
WHY
Packaging errors silently alter behaviour.
WHAT TO COMPARE
Predictions from the new model against the current one, on the same data.
WHAT TO INVESTIGATE
Large disagreements.
WHAT TO NEVER SKIP
Testing the whole path, end to end, before deployment.