Algorithms (Feb 2022)
Data Fitting with Rational Functions: Scaled Null Space Method with Applications of Fitting Large Scale Shocks on Economic Variables and S-Parameters
Abstract
Curve fitting discrete data (x, y) with a smooth function is a complex problem when faced with sharply oscillating data or when the data are very large in size. We propose a straightforward method, one that is often overlooked, to fit discrete data (s, ys) with rational functions. This method serves as a solid data fitting choice that proves to be fast and highly accurate. Its novelty lies on scaling positive explanatory data to the interval [0, 1], before solving the associated linear problem Ax=0. A rescaling is performed once the fitting function is derived. Each solution in the null space of A provides a rational fitting function. Amongst them, the best is chosen based on a pointwise error check. This avoids solving an overdetermined nonhomogeneous linear system Ax=b with a badly conditioned and scaled matrix A. With large data, the latter can lack accuracy and be computationally expensive. Furthermore, any linear combination of at least one solution in the basis of the null space produces a new fitting function, which gives the flexibility to choose the best rational function that fits the constraints of specific problems. We tested our method with many economic variables that experienced sharp oscillations owing to the effects of COVID-19-related shocks to the economy. Such data are intrinsically difficult to fit with a smooth function. Deriving such continuous model functions over a desired period is important in the analysis and prediction algorithms of such economic variables. The method can be expanded to model behaviors of interest in other applied sciences, such as electrical engineering, where the method was successfully fitted into network scattering parameter measurements with high accuracy.
Keywords