mean absolute percentage error(mape)
date: 2023-01-26 excerpt: mean absolute percentage error(mape)について
mean absolute percentage error(mape)について
概要
- 真の値からの誤差をパーセンテージで計算して、その平均
sklearn.metrics.mean_absolute_percentage_error
from sklearn.metrics import mean_absolute_percentage_error
trues = [1]
preds = [2]
print(mean_absolute_percentage_error(trues, preds)) # 1.0
trues = [1]
preds = [0.5]
print(mean_absolute_percentage_error(trues, preds)) # 0.5