Peak Detection in Time Series

后端 未结 6 1787
栀梦
栀梦 2021-02-01 07:59

I\'m currently working on a little project in which I want to compare two time-series. The similarity measure is really vague, they are considered to be similar if the two time

6条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 08:56

    You can use a very simple local extremes detector:

    // those are your points:
    double[] f = {1, 2, 3, 4, 5, 6, 5, 4, 7, 8, 9, 3, 1, 4, 6, 8, 9, 7, 4, 1};
    List ext = new ArrayList ();
    for (int i = 0; i

    This will work nice with smooth series. If you have a certain variation in your data, you should put it through a low pass filter first. A very simple implementation of a low pass filter would be the moving average (every point is replaced by the average of the nearest k values, with k being the window size).

提交回复
热议问题