How to detect abrupt changes in an array with condition?

I have an array of 45000 values. I need to detect the change points within a limited value from this array. Eg: let the values be 182 161 132 92 53 39 62 92 131 165 185. I need to find the change points from 132 to 131 in this series,ie. it should only detect the points which will recover to almost the same point where it deviates. How can i use ischange or findchangepts to find these points?

2 个评论

Why do you consider the points "from 132 to 131" as change points? What exactly does this mean: "points which will recover to almost the same point where it deviates"? What have you tried so far and which problems occur?
I consider only that as an error for the dataset. My intention is to find the exact deviation intervals. Not all the changes occurring. If a change is occurring and it recovers to almost the same value, it is considered as an error. That needs to be detected.

请先登录,再进行评论。

回答(1 个)

Asking for ischange on your small data set without any options indicates that every point other than the first is a change point.
x = [182 161 132 92 53 39 62 92 131 165 185];
ic = ischange(x);
[x; ic]
I would specify some of the options for ischange. For example, if I know I want to find at most three change points:
ic2 = ischange(x, 'MaxNumChanges', 3);
[x; ic2]
This identifies the 132-92 transition and the 92-131 transition as change points. Changing the METHOD input or specifying a 'Threshold' for what constitutes an "abrupt" change in the data may help isolate the specific significant changes you seek.

1 个评论

My intention is to find the exact deviation intervals. Not all the changes occurring.

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Argument Definitions 的更多信息

提问:

2019-5-3

评论:

2019-5-4

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by