为了寻找热门话题,我将标准分数与移动平均线结合使用:
z-score = ([current trend] - [average historic trends]) / [standard deviation of historic trends]
到目前为止,我这样做如下:
无论什么时候,对于历史趋势,我只是 24 小时返回。假设我们现在有 1 月 12 日下午 3:45:
current_trend = 点击 [1 月 11 日 3:45 - 1 月 12 日 3:45]
历史趋势 = 点击 [1 月 10 日 3:45 - 1 月 11 日 3:45] + 点击 [1 月 9 日 3:45 - 1 月 10 日 3:45] + 点击 [1 月 8 日 3:45 - 1 月 9 日 3: 45] + ...
但这真的足够吗?如果我总是在 00:00 点开始不是更好吗?例如,对于相同的数据(下午 3 点 45 分)以这种方式:
current_trend = 点击 [Jan 11, 0:00 - Jan 12, 0:00]
历史趋势 = 点击 [1 月 10 日 0:00 - 1 月 11 日 0:00] + 点击 [1 月 9 日 0:00 - 1 月 10 日 0:00] + 点击 [1 月 9 日 0:00 - 1 月 9 日 0: 0] + ...
我相信结果会有所不同。但是哪种方法会给您带来更好的结果?
我希望你已经理解我的问题,你可以帮助我。:) 提前致谢!