Giter Site home page Giter Site logo

danielpuka / time_series_anomaly_detection_examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbris/time_series_anomaly_detection_examples

0.0 0.0 0.0 3.61 MB

Several examples of anomaly detection algorithms for time series data.

License: MIT License

Shell 0.47% Python 87.13% R 10.82% Makefile 1.00% Dockerfile 0.59%

time_series_anomaly_detection_examples's Introduction

time_series_anomaly_detection_examples

Table of Contents

Introduction

The Time Series Anomaly Detection repo contains several examples of anomaly detection algorithms for use with time series data sets.

Examples can be found in the python directory and r directory.

InfluxDB and Grafana are optionally included in the Docker stack for data storage and visualization purposes. Telegraf has been included to fill the InfluxDB with dummy metric data.

Redis is optionally included in the Docker stack for caching (i.e. memoization) purposes.

If you're using Docker, execute build.sh to get started.

Python

Examples are typically written in python. From the .env.example file, you can see that scripts are written in python 3.8.2. A list of module dependencies can be found in the Dockerfile and requirements.txt. You aren't forced to use Docker, and can use something like Conda instead if that's your preference.

If you opt to use Docker, you can view the Makefile for relevant Docker commands. The make penter command will create a new container and execute the python CLI. The make prun command will run a python script. For example, make prun d=ts_price_anomaly_detection s=view will run ts_price_anomaly_detection/view.py

Example anomaly detection algorithms can be found in the python directory, and each example directory contains a similar structure. When exploring an example, you should first read the README.md and references.md files. The references.md file will provide you with a relevant link to a tutorial page and data set. Download the recommended data set and place it in the local data directory (don't place it in the root data directory).

You can then execute various python scripts to analyze and model the data. It's recommended that you run explore.py then view.py first to better understand the distribution of the data.

R

Additional examples are written in R. From the .env.example file, you can see that R scripts are written in version 3.6.3. A list of additional R packages can be found in the Dockerfile.

As the docker-compose.yml file shows, this repo employs the rocker/tidyverse image which already includes the tidyverse collection and RStudio server.

If you opt to use Docker, you can view the Makefile for relevant Docker commands. The make renter command will allow users to execute shell commands within the R container. The make rrun command will run an R script. For example, make rrun s=bitcoin_anomalies will run $R_STUDIO_USER/bitcoin_anomalies.r

Example anomaly detection algorithms can be found in the r directory. You can then execute various r scripts to analyze and model the data.

InfluxDB

InfluxDB is a time series database. For those who are unfamiliar, more information can be found at influxdata.com. InfluxDB can be combined with Grafana to analyze and visualize the data. View the .env.example file to configure your InfluxDB & Grafana versions and ports.

CSV files can be easily imported to your InfluxDB instance using the csv-to-influxdb package. Each example directory will contain a README.md file with a csv-to-influxdb.py command to execute.

time_series_anomaly_detection_examples's People

Contributors

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