Keep the direction of a prediction error

Choose a sign convention before logging errors.

Choose a sign convention before logging errors. Subtract the observed time from the prediction. A negative result means the transfer took longer than predicted.

Work through the example

With a prediction of 3 seconds and actual times of 2 and 6, the signed errors are +1 and −3 seconds.

Run the example as a separate Python file. The inputs are synthetic so you can change them and see exactly which assumption affects the result.

Run the example

predicted = 3
actuals = [2, 6]
print([predicted - actual for actual in actuals])

Expected output

[1, -3]

Reference: https://scikit-learn.org/stable/modules/model_evaluation.html

The team guide · My original notes on testing coding agents · Working with Lightbulb Partners