Problem 3: Compare MAE and RMSE with an Outlier
Easypython
Problem Description
Write a Python program that calculates MAE and RMSE for a dataset with one significant outlier error, demonstrating how RMSE is affected more strongly than MAE.
Input
Actual and predicted values, where one prediction has a very large error.
Output
MAE and RMSE, showing the difference in sensitivity.
Constraints
- At least 5 data points, with one clear outlier error.
Example Input
textactual=[10,20,30,40,50], predicted=[11,19,31,39,100]
Example Output
textMAE: 11.0 RMSE: 22.65
Concepts Covered
mean_absolute_error(), mean_squared_error(), outlier sensitivity comparison.