Anomaly Detection with Twitter in R 异常的图片示意 代码

Anomaly Detection with Twitter in R

Anomaly Source Code 测试代码

twitter AnomalyDetection 源码

Twitter open source there anomaly detection package in R.

Does it really detect anomalies?

What anomaly can be detected?

Its aim to detect anomalies in seasonality time series and underlying trends.

YES! It actually works very well. At least when you use it for what it was created for…

It was designed to detect global and local anomalies.

Global anomaly:

It is the kind of anomaly we are the most familiar with. It’s an anomaly who goes out of the usual interval. It isn’t always the best way, but using the 95 percentile technique can detect this kind of anomaly.

Local anomaly

Very often we can see an underlying trend into our data. It usually looks like a “wave”: low activity on the morning, high during the day, low at night. Local anomaly occur within this context. For example: high activity at night mean anomaly.

First, it aims to detect global and local anomalies (see above).

It supposes to understand “underlying trends” such as an organic growth in the metrics.

Twitter call this algorithm a Seasonal Hybrid ESD (S-H-ESD).

I was very impressed by twitter anomaly detection. It spot many different anomaly case.

Of course it didn’t detect everything. Only what it was built for.

[Anomaly detected]Grow to early in seasonal metrics

[Anomaly detected]Some unusual noise

[Anomaly detected]More noise than usual

[Anomaly detected]Break down

[Anomaly detected]Sudden grow

[Anomaly detected]Sudden grow

[Anomaly detected]Pick

[Anomaly detected]Activity when usually none

[Anomaly not detected]Linear grow

[Anomaly not detected]Linear seasonal grow

What can’t be detected?

Twitter Anomaly detection is impressive. But it isn’t the only way to detect anomaly.

It is built to detect certain kinds of anomaly. Not all of them!

[Anomaly not detected]Flat signal

[Anomaly not detected]No noise

[Anomaly not detected]Exponential grow

[Anomaly not detected]Negative seasonal anomaly

[Anomaly not detected]Negative seasonal anomaly

Conclusion

Twitter made a big breakthrough into anomaly detection.

It detects a wild type of anomalies.

Only two negative review:

To my eyes, it only failed to detect one kind of anomaly “Negative seasonal anomaly” (last graph above)

R is awesome. But not suitable for anomaly detection in real-time

Over all it is an incredible peace of software… Congrat’s Twitter, outstanding job !

Source Code on GitHub

Anomaly detection

Anomaly will find common patterns in your metrics after few weeks of monitoring.

It will train itself to detect anomaly such as:

Recurring event

Similar behaviour

Correlation

Trends

and much more…

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 我无法向你道歉, 语言只会添乱。 这里没有衡量对错的标准, 破绽百出,你仍旧不知道我, 我只是希望你快乐。 不管是...
    丁千阅读 193评论 0 0
  • 想了很久,觉得还是要把自己的毒鸡汤写一写。总觉得自己没人逼一逼,就好像生活过得挺无忧无虑,然后压力到来的时候,整个...
    fightting阿阿清阅读 429评论 0 1
  • HTML文件内容 <!DOCTYPE html> var btn = document.ge...
    小飞侠zzr阅读 914评论 0 0
  • 坦白说,我不知道我会在何时跨过彻底解脱点,或者今生能否跨过彻底解脱点,我只是相信,一切都是最好的安排,一切...
    梦里说梦的梦话阅读 271评论 0 0