Explore Library
Code QuizIntermediate

Computing MAE

Mean absolute error must average the absolute differences.

Codepython
import numpy as np

y_true = np.array([10.0, 8.0, 6.0])
y_pred = np.array([12.0, 5.0, 6.0])

# Mean absolute error
mae = np.mean(y_true - y_pred)
print(mae)

This is meant to compute mean absolute error. What is the bug?