1. 标量

真实值为

  • 绝对误差(absolute error):(有单位);
  • 相对误差(relative error):(是一个比值)

2. 矢量间的误差

def rel_err(x, y):
    return np.max(np.abs(x-y)/np.maximum(1e-8, np.abs(x) + np.abs(y)))

相关文章:

  • 2021-06-25
  • 2021-12-12
  • 2021-04-21
  • 2021-07-18
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-07-25
  • 2021-11-27
  • 2021-11-27
相关资源
相似解决方案