Reputation: 614
Let's say i have an array of numbers. If i sort the array i have a decently smoothed curve. Is there an easy way to get an estimate for the point where the slope of the line increases the most? (I think this is called point of inlection.
Example:
Upvotes: 0
Views: 1355
Reputation: 809
In a digital signal, the derivative correlates to the difference between two adjacent values.
So to get that, if a
is a numpy array:
a_prime = a[1:] - a[:-1]
What you're looking for is the point at which the derivative of the derivative is the greatest (which isn't the inflection point):
answer = np.argmax(a_prime[1:] - a_prime[:-1])
Upvotes: 1