Skip to main content

Max Error

The max error is a very simple machine learning, it computes the worst error between the predicted values and ground truth.


from sklearn.metrics import max_error
Predicted = [1, 2, 3]GroundTruth = [7, 9 ,13]
print(max_error(y_true, y_pred))
# Output: 10

In this code example we can the third value in the lists 13 and 3 is the worst error, hence 10 was the output.

This metric can useful in cases to find outliers in the data.