Code Monkey home page Code Monkey logo

anomaly-detection's Introduction

AnomalyDetection and BreakoutDetection in python

This is a python implementation of Twitter's AnomalyDetection and BreakoutDetection.

Install

The dependencies contain C++ and Fortran code, so that you need gcc installed. Checkout the code, enter the folder and run:

pip install -r requirements.txt

When use this as a library, please include the line for "pyloess" from "requirements.txt" in your "requirements.txt".

Usage

The parameters are the same as the AnomalyDetectionVec in Twitter's AnomalyDetection (except the plot related ones). You need to put your time series data into a list of float numbers:

from anoms import detect_anoms
from breakout import detect_breakout

x = list()

\# put the data into x

res = detect_anoms(x, max_anoms=0.02, alpha=0.01, direction='both')

res will be a list of int numbers, consists the index of detected anomalies in x. If e_value=True is set, res will be a tuple, whose first value is the list of index of detected anomalies and the second value is the list of expected values.

res = detect_breakout(x, min_size=24, method='multi', beta=0.001, degree=1)

res will be a list of int numbers, consists the index of detected breakout in x.

anomaly-detection's People

Contributors

liujingchen avatar alexmkt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.