Re: Finding local minima and maxima of a graph

2010-12-05 Thread François Chaplais
I have had a similar request from my son who wanted to isolate "significant" peaks in data (coming from biological experiments). I gave him a helping hand in doing the preprocessing that removes the variations that are "not significant". It did, however, some time to explain this, but he got it,

Re: Finding local minima and maxima of a graph

2010-12-05 Thread James Hurley
Brian, Jonathan, Jerry, et al As to the number of potential observations. Thousands of series, 10s to hundreds of thousands of observations per series at a minimum. Possibly millions. So computational efficiency isn't a luxury, it is a requirement. Brian The following method is fairly

Re: Finding local minima and maxima of a graph

2010-12-05 Thread Jonathan Lynch
p with some matrix manipulations - when I get >> to my computer I will explain further. >> >> >> Sent from my Verizon Wireless BlackBerry >> >> -Original Message- >> From: Bryan McCormick >> Sender: use-livecode-boun...@lists.runrev.com >

Re: Finding local minima and maxima of a graph

2010-12-05 Thread Jonathan Lynch
xplain further. > > > Sent from my Verizon Wireless BlackBerry > > -Original Message- > From: Bryan McCormick > Sender: use-livecode-boun...@lists.runrev.com > Date: Sun, 05 Dec 2010 02:12:29 > To: > Reply-To: How to use LiveCode > Subject: Re: Finding lo

Re: Finding local minima and maxima of a graph

2010-12-05 Thread jonathandlynch
-To: How to use LiveCode Subject: Re: Finding local minima and maxima of a graph Jonathan, Jerry, et al As to the number of potential observations. Thousands of series, 10s to hundreds of thousands of observations per series at a minimum. Possibly millions. So computational efficiency isn

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Bryan McCormick
Jonathan, Jerry, et al As to the number of potential observations. Thousands of series, 10s to hundreds of thousands of observations per series at a minimum. Possibly millions. So computational efficiency isn't a luxury, it is a requirement. Yes, absolutely, detrending is required. I won't go

Re: Finding local minima and maxima of a graph

2010-12-04 Thread James Hurley
Message: 26 Date: Sat, 04 Dec 2010 12:56:05 -0500 From: Bryan McCormick To: use-livecode@lists.runrev.com Subject: Finding local minima and maxima of a graph Message-ID: <4cfa80b5.3090...@deepfoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I have a very large number of grap

Re: Finding local minima and maxima of a graph

2010-12-04 Thread jonathandlynch
local minima and maxima of a graph Yes, what Jonathan wrote. The folks who do heavy computing in the audio world do something called windowing. Thats like a rolling average, except weighted toward the "center". Choosing the width of the window and the algorithm for determining its

Re: Finding local minima and maxima of a graph

2010-12-04 Thread jonathandlynch
local minima and maxima of a graph Sent: Dec 5, 2010 12:33 AM Jonathan, Sure, that approach can work. But it isn't terribly efficient. It would however be less computationally intensive if I detrend first. That's the first step. So if you have a notion on a least squares linear fit l

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Jerry J
Yes, what Jonathan wrote. The folks who do heavy computing in the audio world do something called windowing. Thats like a rolling average, except weighted toward the "center". Choosing the width of the window and the algorithm for determining its shape can get complicated, and has been greatly

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Bryan McCormick
Jonathan, Sure, that approach can work. But it isn't terribly efficient. It would however be less computationally intensive if I detrend first. That's the first step. So if you have a notion on a least squares linear fit line, that would be most welcome. _

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Jonathan Lynch
Hi Bryan, The first step is to define a local minimum or maximum for this situation. Plotting a 3-day rolling average would be pretty straight forward. Is three days sufficient? You could get a 5-day rolling average, then pick five day averages that are are greater than, or less than, their neig

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Bryan McCormick
Jerry, Yes, that would be far too many hits and there has to be some scaling applied as a filter for that reason. The criteria more precisely is "significant" peak and trough values. With significant being the trick. For example, is the peak or trough 3 percent or more away. There is a seaso

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Jerry J
On Dec 4, 2010, at 7:38 PM, Bryan McCormick wrote: > Peter, Jonathan > > I had thought to use a sin function on the time series to find peak and > trough values. I would filter the sin function results for those close to 1 > or -1, though I am not sure what the filter interval will be just yet.

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Bryan McCormick
Peter, Jonathan I had thought to use a sin function on the time series to find peak and trough values. I would filter the sin function results for those close to 1 or -1, though I am not sure what the filter interval will be just yet. Then, I would be able to grab the value from the actual ti

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Bryan McCormick
Jonathan, No, these are data files in .csv format. Column data with high and low values from the series. Unfortunately I have thousands of these to wade through, with this being an ongoing project. First task is to deal with the history. ___ use-li

Re: Finding local minima and maxima of a graph

2010-12-04 Thread jonathandlynch
: Sat, 04 Dec 2010 14:10:26 To: Reply-To: How to use LiveCode Subject: Re: Finding local minima and maxima of a graph Peter, Yes, I have thousands of .csv files to process. I have data that is ordered by column containing high and low values. On 12/4/2010 12:56 PM, Bryan McCormick wrote: >

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Bryan McCormick
Peter, Yes, I have thousands of .csv files to process. I have data that is ordered by column containing high and low values. On 12/4/2010 12:56 PM, Bryan McCormick wrote: I have a very large number of graphs to crunch through to find local minima and maxima. The data is regularly spaced, whic

Re: Finding local minima and maxima of a graph

2010-12-04 Thread Peter Brigham MD
Do you have access to the data the graphs are based on? Or are you talking about trying to analyze the shape of a curve (bitmapped or otherwise)? The two problems will have quite different approaches. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Dec 4, 2010