I’m trying to find some way to mathematically calculate the number of peaks in a distribution. I know there are various tests (such as Shapiro Wilk) that assess whether a distribution is normal, but I’m not aware of any that actually tell you how many peaks are present. Normally, I’d just do this visually, but this is for a program that involves changes of distribution over time. The end goal is to show how the distribution changes (or doesn’t) from a normal distribution to a multimodal distribution over time — including tracking different numbers of peaks, should that happen. So I need to be able to:
- look beyond just whether the distribution is normal or not and
- have this happen programmatically, not visually. Does such an algorithm exist?
scipy.signal.find_peaks. – Galen Mar 29 '22 at 01:53