enter image description hereMost of the learnings and examples out there talks about finding inflection point given there is a function expression. What happens when I do-not know the function expression? The movement of the graph is not defined by any formula and the graph is live in nature .
How to calculate the inflection points, positive, negative slopes from the graph itself in a continuous manner in time ?

  • Could you maybe give a plot of some example data? You could always fit a cubic polynomial to successive intervals of time with enough data to make it reasonable (this is called cubic splines), and then compute the inflection points in the cubics. – Adrian Keister Oct 2 at 17:56
  • @AdrianKeister I have added a picture to get a better view, this is the graph and the incoming values is not within my control, all matters to me are the inflection points, therefore the question is how to detect them? – Rai Bose Oct 2 at 18:02
up vote 1 down vote accepted

OK, VERY IMPORTANT: what you've circled are most definitely NOT inflection points. You have circled local minima. There are many algorithms for finding those that are very efficient. One of the easiest things you could do, I think, is simply multiply all the $y$ values by $-1$ and then use a peak-finding routine. Peak-finders are very common and not difficult to find. The trick with peak-finders is to choose the window size. If you choose it too large, your algorithms gets "ham-fisted" and won't detect peaks in a smaller region very well. On the other hand, your data oscillates enough to where setting the window size too small will find far too many peaks. Another thing you could try is first filtering your data before running it through the peak-finder. I find a median filter works well if you have a lot of outliers. Your example data doesn't look like it has too many outliers, so maybe just a regular low-pass filter would do the trick. So that's my recommendation: use a low-pass filter (plot the filtered on top of the unfiltered to make sure your cutoff frequency is set reasonably) then use the peak-finder on $-y.$

  • Thanks a lot for the direction , i am very new to the math application world, would you recommend python-peakutil as a peak finder ? – Rai Bose Oct 2 at 18:21
  • 1
    Haven't used it, but definitely try it out, particularly if it's based on numpy (it seems hard to get documentation on python-peakutil!). Make sure to plot the results, and see if you like them. – Adrian Keister Oct 2 at 18:27

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.