Answer: no, there is no “good” way to write down the formula, or at least not in short form. Some types of interpolations, such as RBF and Loess, do not directly look for a parametric mathematical function that fits the data, and instead they calculate the value of each new data point separately as a function of other points.
These interpolations are guaranteed to always work well for your data (for example, in your case), and the reason for this is that you need a very large number of parameters to describe them (basically all of your data points). Think of it this way: you can interpolate linearly by connecting consecutive data points with straight lines. You can put any data in this way and then describe the function in mathematical form, but this will require a large number of parameters (at least as many as the number of points). In fact, what you are doing right now is pretty much a smoothed version of this.
If you want the formula to be short, this means that you want to describe the data using a mathematical function that does not have a large number of parameters (in particular, the number of parameters should be much less than the number of data points). Examples include logistic functions, polynomial functions, and even a sinusoidal function (which you used to generate data). Obviously, if you know which function generated the data, which will be the function you want to put.
source share