Issue
I made a Linear Regression in Python.I computed the MAPE as follows, and got a value of 0.052:
mean_absolute_percentage_error(y_test, pred_test)
Does this mean that my mean percentage error is 0.052% or 5.2% ?
Solution
In your case, it means 5.2%. You can easily test this, for example if we have the prediction to be 80% of the true, then the error will be 20% and you can see you get 0.2:
from sklearn.metrics import mean_absolute_percentage_error
y_true = [3.3, 1.5, 2.1, 7.2]
y_pred = [0.8*i for i in y_true]
mean_absolute_percentage_error(y_true, y_pred)
Out[9]: 0.19999999999999996
Answered By - StupidWolf
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.