如何用百分比表示均方根误差?

时间:2019-03-24 15:00:03

标签: python machine-learning scikit-learn mean-square-error

我想将我的预测结果与另一个人的预测结果进行比较。在文章中,作者说“均方根的相对百分比(RMS%)用于评估性能”。这就是我要与我的预测进行比较的地方。

当前我正在计算均方根误差,但是我不知道如何将其表示为百分比

这就是我使用Python计算均方根误差的方法

rmse = math.sqrt(mean_squared_error(y_test,y_predict)

1 个答案:

答案 0 :(得分:0)

使用numpy lib来计算rmspe(How to calculate RMSPE in python using numpy):

rmspe = np.sqrt(np.mean(np.square(((y_true - y_pred) / y_true)), axis=0))
相关问题