GithubHelp home page GithubHelp logo

lulzzz / rnn-time-series-anomaly-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chickenbestlover/rnn-time-series-anomaly-detection

0.0 2.0 0.0 31.33 MB

RNN based Time-series Anomaly detector model implemented in Pytorch.

License: Apache License 2.0

Python 100.00%

rnn-time-series-anomaly-detection's Introduction

RNN-Time-series-Anomaly-Detection

RNN based Time-series Anomaly detector model implemented in Pytorch.

This is an implementation of RNN based time-series anomaly detector, which consists of two-stage strategy of time-series prediction and anomaly score calculation.

Requirements

  • Python 3.5+
  • Pytorch 0.3.1+
  • Numpy
  • Matplotlib

Dataset

NYC taxi passenger count

Electrocardiograms (ECGs)

2D gesture

Implemented Algorithms

Example of usage

1. Time-series prediction: Train and save RNN based time-series prediction model

    python 1_train_predictor_ecg.py
    python 1_train_predictor_nyc.py

2. Anomaly detection: Fit multivariate gaussian distribution on train dataset and calculate anomaly scores on test dataset

    python 2_anomaly_detection_ecg.py
    python 2_anomaly_detection_nyc.py

Result

1. Time-series prediction: Predictions from the stacked RNN model

prediction1

prediction2

2. Anomaly detection:

Anomaly scores from the Multivariate Gaussian Distribution model

equation1

  • NYC taxi passenger count

scores1

scores2

  • Electrocardiograms (ECGs)

scores3

scores4

scores5

scores6

To do

  • Add more time-series data
  • Add quantitative evaluation method such as precision, recall and F1 score.

rnn-time-series-anomaly-detection's People

Watchers

 avatar  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.