English

Hyb Error: A Hybrid Metric Combining Absolute and Relative Errors

Numerical Analysis 2024-05-22 v2 Numerical Analysis

Abstract

Suppose xx is an approximation of yy. This paper proposes using xy1+y\frac{|x-y|}{1+|y|}, named Hyb Error, to measure the error. This metric equals half the harmonic mean of absolute error and relative error, effectively combining their advantages while mitigating their limitations. For example, Hyb Error approaches absolute error as y|y| approaches 0, thereby avoiding the exaggeration of relative error, and approaches relative error as y|y| approaches infinity, thereby avoiding the exaggeration of absolute error. The Hyb Error of ϵ\epsilon is equivalent to xy=ϵ+ϵy|x-y|=\epsilon+\epsilon |y|, which implies isclose(x,y,ϵ,ϵ)=True\mathrm{isclose}(x,y,\epsilon,\epsilon)=\mathrm{True}, where ``isclose'' is a common floating-point equality check function in numerical libraries. For sequences, this property makes the Maximum Element-wise Hyb Error (MEHE) a pragmatic error metric that reflects the most significant error and equals the decision boundary of the ``isclose'' function.

Cite

@article{arxiv.2403.07492,
  title  = {Hyb Error: A Hybrid Metric Combining Absolute and Relative Errors},
  author = {Peichen Xie},
  journal= {arXiv preprint arXiv:2403.07492},
  year   = {2024}
}
R2 v1 2026-06-28T15:17:00.676Z