A Step-by-Step Guide To Accurately Detect Peaks and Valleys. | by Erdogan Taskesen | Sep, 2023

Peak is a challenging step in many . Read and learn how to accurately detect peaks and valleys in 1D vectors and 2D arrays ().

Erdogan Taskesen
Towards Data Science
by Willian Justen de Vasconcellos on Unsplash

Our human brain is excellent in peak detection in relation to its context. What seems an easy task by eye can be a challenging task to automate by . In general, peaks and valleys indicate (significant) events such as sudden increases or decreases in /volume, or sharp rises in demand. One of the is the definition of a peak/valley which can differ across applications and domains. Other challenges can be more , such as a noisy signal that can result in many false positives or a single threshold that may not accurately detect local events. In this , I will describe how to accurately detect peaks and valleys in a 1-dimensional vector or a 2-dimensional array () without making assumptions about the peak shape. In addition, I will demonstrate how to handle noise in the signal. Analyses are performed using the findpeaks library, and hands-on examples are provided for experimenting.

The detection of (sudden) changes in a signal is an important task in many applications that needs to be reported or monitored. There are roughly two types of “sudden changes”, the so called outliers and peaks of interest which are conceptually different. Outliers are data points that significantly deviate from what is normal in the data set whereas peaks of interest are specific data points or regions within a signal that have significance or relevance for the analysis or domain in question. In case you need a deep dive with hands-on examples in outlier detection, try these blogs [1, 2].

Source link