开发者

How to calculate numerical trend lines in python

开发者 https://www.devze.com 2023-03-07 07:42 出处:网络
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

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

精彩评论

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