zoukankan      html  css  js  c++  java
  • 使用Twitter异常检测框架遇到的坑

      在Github上搜索“Anomaly Detection”,Twitter的异常检测框架(基于R语言)高居榜首,可见效果应该不错:

       但是活跃度并不高,3-4年没人维护了:

        因此在使用时难免会遇到一些坑,整个使用方式如下(红色部分,就是直接在RStudio中运行时,可能有异常的地方):

    install.packages("devtools")
    devtools::install_github("twitter/AnomalyDetection")
    library(AnomalyDetection)
    
    data(raw_data)
    res = AnomalyDetectionTs(raw_data, max_anoms=0.02, direction='both', plot=TRUE)
    res$plot

    1.devtools::install_github("twitter/AnomalyDetection")

      异常如下:

    Error in process_initialize(self, private, command, args, stdin, stdout,  : 
      processx error, setup stdio: #2 The system cannot find the file specified.
     at 'win/processx.c:984'
    In addition: Warning messages:
    1: In untar2(tarfile, files, list, exdir) :
      skipping pax global extended headers
    2: In untar2(tarfile, files, list, exdir) :
      skipping pax global extended headers

       该问题没有很好解决,同事用RStudio下载是可以的,然后把下载到R下library里的AnomalyDetection拷贝到我机器上对应目录下

    2.res = AnomalyDetectionTs(raw_data, max_anoms=0.02, direction='both', plot=TRUE)

     异常如下:

    Error: Column x is a date/time and must be stored as POSIXct, not POSIXlt

      该问题已经有人解决了,并且提交了PR:https://github.com/twitter/AnomalyDetection/pull/92

      所以重新下载了修复后的异常检测代码:

    devtools::install_github("caijun/AnomalyDetection")

        

     关于Twitter异常检测的一些链接:

    1.Github上的源代码

      https://github.com/twitter/AnomalyDetection

    2.Twitter异常检测的能力范围:

       https://anomaly.io/anomaly-detection-twitter-r/

    3.在简书上归纳Twitter异常检测的帖子:

       https://www.jianshu.com/p/02ba9ce11656

  • 相关阅读:
    Unity 检查文件命名是否规范
    比特 bit 字节 byte ASCII码 Unicode UTF 32 UTF 8 傻傻分不清楚
    LuaJIT诡异bug(疑似)
    [转]现代密码学实践指南
    [转]安卓系统下luajit性能问题
    [转]用好lua+unity,让性能飞起来——luajit集成篇/平台相关篇
    lua string.format的bug(已知存在于lua5.1.5、LuaJIT-2.0.4)
    编译libmysqlclient.a静态库
    linux模拟复杂网络环境下的传输
    mingw & vs 兼容
  • 原文地址:https://www.cnblogs.com/liugh/p/9932550.html
Copyright © 2011-2022 走看看