I am trying to fit data to a polynomial using Python - Numpy. The points, with lines sketched above them are as in the picture.
I am trying to fit those points to a polynomial of 4. or 5. degree. However, all I can get is nothing more than a line. The coefficients of other than linear terms are too small. I tried to do that both with Numpy and Scipy. In Numpy, I have used the
polyfit function and followed the example given in this link and in Scipy used the
optimization.curve_fit function and followed the page in the comment below. (I cannot post more than two links!).
My question is: why do I get a linear fit for such data? I provide high enough data (about 70 points). And how can I improve my fit?
Any suggestions are highly appreciated!