0 0 votes Given the following sample dataset with 5 samples and 2 features: Sample Feature 1 Feature 2 Actual Value Predicted Value 1 2 3 4 6 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 Calculate the residual errors, mean squared error (MSE), mean absolute error (MAE), and root mean squared error (RMSE) using a sample model. Machine Learning residual linear-regression ml-midterm ml-exercise machine-learning ele888-midterm + – 50% Accept Rate Accepted 31 answers out of 62 questions tofighi 116k points 73 79 101 answer comment Share 0 reply Please log in or register to add a comment.
0 0 votes 1. First, we need to calculate the residual errors. Residual errors are the difference between the actual values and predicted values. Sample Feature 1 Feature 2 Actual Value Predicted Value Residual Error (Actual - Predicted) 1 2 3 4 6 -2 2 3 4 5 6 -1 3 4 5 6 7 -1 4 5 6 7 8 -1 5 6 7 8 9 -1 Next, we can calculate the MSE by taking the average of the squared residual errors. $MSE = ((-2)^2 + (-1)^2 + (-1)^2 + (-1)^2 + (-1)^2) / 5 = 10 / 5 = 2$ To calculate the MAE, we take the average of the absolute residual errors. $MAE = (|-2| + |-1| + |-1| + |-1| + |-1|) / 5 = 6 / 5 = 1.2$ Finally, to calculate the RMSE, we take the square root of the MSE. $RMSE = sqrt(2) = 1.41$ Therefore, the residual errors are [-2, -1, -1, -1, -1], the MSE is 2, the MAE is 1.2, and the RMSE is 1.41. tofighi answered Jan 26, 2023 tofighi 116k points 73 79 101 comment Share 0 reply Please log in or register to add a comment.