๐งต Untitled Thread
Anonymous at Sat, 11 May 2024 15:39:29 UTC No. 16170872
I'm looking for methods of finding peaks and valleys in a histogram. The simplest way is to check if a bin is higher or lower than its n adjacent bins. I'm wondering if there are any other methods, and if there are any books on this. Thanks for the help!
Anonymous at Sat, 11 May 2024 15:41:22 UTC No. 16170874
>>16170872
Do you mean like an actual search strategy for finding local minima and maxima given a particular curve?
When you have a histogram with discrete points it's a little more complicated because the function is differentiable nowhere and this the notion of a local minima/maxima is a bit more vague.
Anonymous at Sat, 11 May 2024 15:43:56 UTC No. 16170881
>>16170874
No I mean discrete values. So given a list of bins and their values find all local minima and maxima.
Anonymous at Sat, 11 May 2024 15:45:14 UTC No. 16170882
>>16170881
If you have discrete values every single point with differing adjacent points is a local minima/maxima. This is what I mean by it gets vague.
Anonymous at Sat, 11 May 2024 15:46:41 UTC No. 16170884
>>16170881
>>16170882
Or a saddle point, if the adjacent neighbors don't have the same value this point is by definition a local extrema of one of these three forms.
Anonymous at Sat, 11 May 2024 15:47:28 UTC No. 16170885
>>16170882
That's correct. The simplest method is if a bin is the minimum of its two adjacent bins, it's a valley. To make this less prone to noise you can check n adjacent bins. I'm looking for any other methods that might be better.
Anonymous at Sat, 11 May 2024 16:03:28 UTC No. 16170904
>>16170872
https://github.com/scipy/scipy/blob