Results 1 to 3 of 3

Thread: Smoothing algorithm for times series and slope measurement

  1. #1
    May 2009

    Smoothing algorithm for times series and slope measurement


    I'm doing an experiment that gathers one data point approximately each second. I have plotted all the datapoints on a graph. The graph has many tops and bottoms. Now due to the fact that there are so many data points and that I can visualle tell that there are several overal trends: one period my data is going up, the next period it is level again for a period of time and the next period it can be down again. And in each of these periods the data can go up, down or level again, although the overal direction is up, down or level. I have searched for different smoothing methods that can follow all these small movements, but at the same time (using a second smoothing algorithm/parameter) can follow the overal movement. I was thinking about using splines or lowess. Are splines or lowess able to do this?

    Second problem I'm having is, after having applied a smoothing algorithm, I need to be able to measure the slope of the smoothing line. I need to know what the slope/curvature of that smoothing line is at any giving moment in time. All the pointers you can give me are really welcome. Thanks.

    Kind regards,

    Follow Math Help Forum on Facebook and Google+

  2. #2
    Jan 2009
    If I had a set of data and it followed a trend I would try to apply a function in your case possibly an exponential function.

    Say if I had number of rats in a field at a given time per year

    t = time in years
    x = number of rats

    I know what the initial number of rats= 20

    so f(0) = 20

    say if the function was the form of

    $\displaystyle f(t) = A*e^t$ where A is an constant

    we apply x = 20 and t = 0 we get

    so $\displaystyle 20 = A*e^0$

    therefore A = 20

    $\displaystyle f(t) = 20e^t$

    by trail and error you could change the t variable to 2t or t/3 etc until it give an APPROXIMATE of your data you have

    Your second problem you could apply differentiation so you would get the tangent a given time or if that isn't what your after you could just put a year Eg 1.5 into f(x) and you would get a return value of number of rats :]

    Hope that helps you and i hope that answers your question.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    May 2009
    Tokyo, Japan
    This is kinda a huge question. There are dozens of methods for making a function to the data, with loads of different parameters and characteristics.

    Linear Basis Function Models are perhaps the easiest to get into without any pattern recognition experience and they have a closed form maximum likelihood solution (and an online version if needed), but it's still too elaborate for me to explain her without copying a book. If you need a predictive distribution over this you can also read up on the baysian variant of this... In your case with lots of ups and downs I'd suggest Gaussian basis functions. These also easily regularize to multiple outputs if needed.

    A problem you might be facing is that the slopes are heavily dependent on the parameters you use, as the stiffness of the line depends on these.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Sobel operator smoothing, why?
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: Jul 16th 2011, 11:20 AM
  2. Algorithm Run Times
    Posted in the Algebra Forum
    Replies: 1
    Last Post: Oct 14th 2010, 08:21 AM
  3. Smoothing factor
    Posted in the Statistics Forum
    Replies: 1
    Last Post: Dec 11th 2009, 02:17 AM
  4. Laplacian Smoothing
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: Apr 7th 2009, 09:19 PM
  5. Replies: 0
    Last Post: Mar 31st 2009, 01:45 AM

Search Tags

/mathhelpforum @mathhelpforum