Saved in:
Bibliographic Details
Main Author: Xie, Peichen
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2403.07492
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910453515419648
author Xie, Peichen
author_facet Xie, Peichen
contents Suppose $x$ is an approximation of $y$. This paper proposes using $\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|$ approaches 0, thereby avoiding the exaggeration of relative error, and approaches relative error as $|y|$ approaches infinity, thereby avoiding the exaggeration of absolute error. The Hyb Error of $ε$ is equivalent to $|x-y|=ε+ε|y|$, which implies $\mathrm{isclose}(x,y,ε,ε)=\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.
format Preprint
id arxiv_https___arxiv_org_abs_2403_07492
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Hyb Error: A Hybrid Metric Combining Absolute and Relative Errors
Xie, Peichen
Numerical Analysis
Suppose $x$ is an approximation of $y$. This paper proposes using $\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|$ approaches 0, thereby avoiding the exaggeration of relative error, and approaches relative error as $|y|$ approaches infinity, thereby avoiding the exaggeration of absolute error. The Hyb Error of $ε$ is equivalent to $|x-y|=ε+ε|y|$, which implies $\mathrm{isclose}(x,y,ε,ε)=\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.
title Hyb Error: A Hybrid Metric Combining Absolute and Relative Errors
topic Numerical Analysis
url https://arxiv.org/abs/2403.07492