Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- def mae(target, predictions):
- error = 0
- for i in range(target.shape[0]):
- error += abs(target - predictions)
- return error/ target.shape[0]
- # < напишите код здесь >
- target = pd.Series([-0.5, 2.1, 1.5, 0.3])
- predictions = pd.Series([-0.6, 1.7, 1.6, 0.2])
- print(mae(target, predictions))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement