📜  计算mape python代码示例

📅  最后修改于: 2022-03-11 14:45:11.143000             🧑  作者: Mango

代码示例1
def mean_absolute_percentage_error(y_true, y_pred): 
    y_true, y_pred = np.array(y_true), np.array(y_pred)
    return np.mean(np.abs((y_true - y_pred) / y_true)) * 100