Differentiation is a cornerstone of computing and data analysis in every discipline of science and engineering. Indeed, most fundamental physics laws are expressed as relationships between derivatives in space and time. However, derivatives are rarely directly measurable and must instead be computed, often from noisy, potentially corrupt data streams. There is a rich and broad literature of computational differentiation algorithms, but many impose extra constraints to work correctly, e.g. periodic boundary conditions, or are compromised in the presence of noise and corruption. It can therefore be challenging to select the method best-suited to any particular problem. Here, we review a broad range of numerical methods for calculating derivatives, present important contextual considerations and choice points, compare relative advantages, and provide basic theory for each algorithm in order to assist users with the mathematical underpinnings. This serves as a practical guide to help scientists and engineers match methods to application domains. We also provide an open-source Python package, PyNumDiff, which contains a broad suite of methods for differentiating noisy data.
翻译:微分是科学与工程各领域中计算与数据分析的基石。事实上,大多数基础物理定律都表述为时空导数之间的关系。然而,导数很少能被直接测量,通常必须从含噪声且可能被污染的数据流中计算得出。计算微分算法文献丰富而广泛,但许多方法需要额外约束条件才能正确工作(例如周期性边界条件),或在噪声和污染存在时性能受损。因此,为特定问题选择最合适的方法可能具有挑战性。本文综述了计算导数的多种数值方法,阐述了重要的背景考量与选择要点,比较了相对优势,并为每种算法提供基础理论以帮助用户理解数学原理。本综述可作为实用指南,协助科学家和工程师根据应用领域匹配相应方法。我们还提供了一个开源Python软件包PyNumDiff,其中包含用于含噪声数据微分的多种方法套件。