I was wondering what kind of model / met开发者_运维知识库hod / technique Trendly might use to achieve this model:
[It tries to find the moments where significant changes set in and ignores random movements]
Any pointers very welcome! :)
I've never seen 'Trendly', and don't know anything about it, but if I wanted to produce that red line from that blue line, in an algorithmic fashion, I would try:
- Fourier the whole data set
- Choose a block size longer than the period of the dominant frequency
- Divide the data up into blocks of the chosen size
- Compare adjacent ones with a statistical test of some sort.
- Where the test says two blocks belong to the same underlying distribution, merge them.
- If any were merged, go back to 4.
- Red trend line is the mean of each block.
A simple "median" function could produce smoother curves over a mostly un-smooth curve.
Otherwise, a brute-force or genetic algorithm could be used; attempting to find the way to split the data into sections, so that more sections = worse solution, and less accuracy of the lines = worse solution.
Another way would be like this: Start at the beginning. As soon as the line moves outside of some radius (3 above or 3 below the first, for instance) set the new height to an average of the current line's height and the previous marker.
If you keep doing that, it would ignore small fluctuations. However, if the fluctuation was large enough, it would still effect it.
精彩评论