开发者

How to calculate numerical trend lines in python

I have a monit开发者_StackOverfloworing application in python 2.6 that calculates the number of entries in a queue (queue_len). I want to create a simple function that can use these queue_len rate of change values over time and extract a trend from them.

The goal is to start up or shut down queue processing nodes depending of the +ive or -ive trend over time and not flip flop.

MACD from the financial arena looks sort of what I need or does it? Looking for any help here.


Isn't that just a simple derivative?

def derivs(l):
  return [l[i + 1] - l[i] for i in range(len(l) - 1)]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜