I'm sorry if my question is not in the right place, maybe I can propose a better place. I do not see any question related to my problem.
If my question is not clear, I will enjoy to provide more information.
Description: We have 5 couples of $ (x, y) $ Data (all positives) and we want to interpolate them. My question is not really about interpolation methods. We would like to use cubic spline interpolation, without the need to provide derivatives at each interpolated points. We need a quick evaluation. When we have more data points (20 for examples, in the same range), the standard cubic spline interpolation is correct.
issue: When we apply the cubic spline interpolation method (we tested other interpolation methods such as those described in scipy.interpolate) in our 5 data, we obtain a smooth curve, but not the wait curve. The curve is submerged in a negative value, and this is not consistent with our data.
Solution found: we transpose the data in $ log $ – $ log $ referential$ X = log (x) $ Y $ Y = log (y) $), and now we find a cubic spline that interpolates these new couples $ (X, Y) $ values. Then, we represent (evaluate) the curve taking the inverse transformation. The curve has the correct shape that we are waiting for.
Question: Are there sometimes some mathematical justifications to interpolate data in $ log-log $ referential (and later conversion) instead of using the standard linear referential? Is there any data pattern that needs to be converted and how to recognize this type of pattern?
The data are $ (x y) $: (424 25.0439), (594 44.5351), (1146 88.8592), (2547 44.5351), (8489 6.29075).
Images of results:
Interpolation of cublic splines in linear referential (that of the initial data).
The current spline interpolation is done in the referential log-log, then it is transformed back to data referential.
Python code to see the problem:
From the scipy import interpolation import matplotlib.pyplot as plt import numpy as np x = [424, 594, 1146, 2547, 8489] y = [25.0439, 44.5351, 88.8592, 44.5351, 6.29075] cs = interpolar.CubicSpline (x, y) xs = np.arange (424, 8489, 1) plt.subplot (211) plt.plot (xs, cs (xs), label = "S") plt.plot (x, y, & # 39; or & # 39 ;, label = & # 39; data & # 39;) cslog = interpolate.CubicSpline (np.log (x), np.log (y)) ylog = cslog (np.log (xs)) plt.subplot (212) plt.plot (x, y, & # 39; or & # 39 ;, label = & # 39; data & # 39;) plt.plot (xs, np.exp (ylog), label = "S") plt.show ()