Compute the mean absolute error between aligned arrays of true targets and predictions.
Implement solve(y_true, y_pred).
Returns. Return a non-negative Python float, 0 for a perfect prediction.
Example 1
Input:
solve([3.0, -0.5, 2.0, 7.0], [2.5, 0.0, 2.0, 8.0])
Output:
0.5
Example 2
Input:
solve([0.0, 0.0], [10.0, -10.0])
Output:
10.0
No results yet
Run your code to check it against the examples, or submit to run every test.