getting significant decrease in a time series array
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hi there, I have time series array and I need to determine one thing: the starting index of a possible significant decrease. However, my problem is a little different from the others: For example
arr[100]=500 and arr[101]=100
is not a significant decrease, it should continue a while, lets say n times consecutively. For n=5 :
arr[100]=500
arr[101]=450
arr[102]=430
arr[103]=400
arr[104]=300
Finally, I need something like this:
C-like code:
int find_significant_decrease(*arr,n)
{
....
return idx;
}
How can I do that? Thanks in advance...
5 个评论
Walter Roberson
2016-12-31
We can code for N consecutive decreases easily enough, but you have not given us enough information about what kind of decrease is significant enough, and you also have not indicated whether the decrease must be strict... For example if it went from 450 to 400 to 401 to 300 at the tail would that modest temporary increase (e.g. noise) be enough to block the trend?
Emrah
2016-12-31
Walter Roberson
2016-12-31
You need to tell us the formula. Mean and standard deviation of all of the prior points? Of all of the points in the complete time series? The points in a window? Once the mean and standard deviation are measured, how does that translate into determining whether points are a sufficient drop?
Once you have specific criteria, determining whether there are n points in a row is not difficult at all.
the cyclist
2016-12-31
To add a bit to what Walter is saying ...
Before one starts to write code, it is best to have firmly in mind the algorithm that one is coding. You haven't specified the algorithm yet, and it sounds like it is not yet clear in your mind.
So, the first step is to decide on the algorithm. Then we can help you with the code.
Image Analyst
2016-12-31
Why don't you eliminate a lot of uncertainty and simply attach a screenshot of your data with the sections of it that you want identified? Also attach a data file with the paper clip icon so that we can use your actual data. Otherwise this could go on for days and delay your solution.
回答(0 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!