Perl: the Markov chain saw PerlMonks

Re: How do I find peaks in noisy data?

by kvale (Monsignor)
 on Apr 26, 2006 at 23:50 UTC ( #545908=note: print w/replies, xml ) Need Help??

in reply to How do I find peaks in noisy data?

Statisitcally, your task is to identify a signal in the presence of noise. If your signal is always much larger than the noise, the task is fairly easy.

One way to handle this is to first calculate the mean and standard deviation (sd) of your values. If the peaks are relatively rare, then the sd will correspond closely to the noise sd. Then pick a threshold, say mean + 3*sd, and flag every sample greater than that as a possible event. From there, you can look at the possible events and decide if they correspond to the signal model you are looking for, e.g., peak height, peak width, shape, etc. If the noise is time-varying, just calculate mean and sd over intervals short enough so that the noise doesn't vary too much, and look for possible events within those intervals using the local mean and sd.

If you have a really good statistical model of the signal and noise, you could create a Kalman filter or Bayesian inference model to detect these signals automatically. But I would try the simple method above first.

-Mark

Create A New User
Node Status?
node history
Node Type: note [id://545908]
help
Chatterbox?
 [GotToBTru]: 'getting'? [Discipulus]: why karlgoethebier ? [GotToBTru]: ugh .. what's the term for comparing versions of an algorithm to determine which is most efficient? [hippo]: Benchmarking? [GotToBTru]: hippo++ erix .oO( apparently but does not GotToBFast )

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-06-22 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
How many monitors do you use while coding?

Results (519 votes). Check out past polls.