0

I am trying to find the curve equation that is the nearest approximation of the trend in the data. I have tried with curve fit, poly1d but none of them give the results I am looking for.

enter image description here

On the picture, the scatter part is the data that I have. The freehand drawn line is the trend that I would like to get.

Can someone please help me? How can I attempt to get to the solution or at least guide me to the right algorithms that can get me there?

I uploaded the data to the git; x and y dataset files.

https://github.com/tadejales/stackoverflow_question.git

Mr. T
  • 11,960
  • 10
  • 32
  • 54
Kozaki
  • 5
  • 1
  • Does this answer your question? [How to add trendline in python matplotlib dot (scatter) graphs?](https://stackoverflow.com/questions/26447191/how-to-add-trendline-in-python-matplotlib-dot-scatter-graphs) – doliphin Feb 24 '21 at 18:08
  • Looks maybe like a power law. Perhaps plotting your data with a log-log would help – John Coleman Feb 24 '21 at 20:00
  • @doliphin No it does not. It gives same result as scipy.curve_fit. Or at least I do not know how to apply it. – Kozaki Feb 25 '21 at 08:15

1 Answers1

0

Before using ready-made softwares often it is of interest to have a short inspection of the problem. In the present case the shape of the cloud of points makes think of drawing it in log-log scales :

enter image description here

Then from this rough fitting one obtains :

enter image description here

Now one can use a specialised software if a better result is expected. The above function and rough numerical values of parameters will be usefull to start the calculus.

JJacquelin
  • 1,529
  • 1
  • 9
  • 11