GithubHelp home page GithubHelp logo

ivetasarfyova / timeseriesanomalydetectionassignments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datamole-ai/timeseriesanomalydetectionassignments

0.0 0.0 0.0 42.82 MB

License: MIT License

Python 100.00%

timeseriesanomalydetectionassignments's Introduction

This repository acts as a base for Datamole's time series anomaly detection assignments.

Requirements

  • Poetry environment file pyproject.toml specifies python packages version requirements. In case you decide to use Python package listed there, the used version must conform to it. Use poetry and base your environment on the provided pyproject.toml. There are also extra dependencies specified in pyproject.toml (e.g. tensorflow). If you decide to use one of these dependencies, make sure that your version conforms to it.

  • File time_series_anomaly_detection/abstractions.py contains Python module with abstract class TimeSeriesAnomalyDetector. Your anomaly detector must implement this class. Make sure that the abstract methods are implemented according to their documentation.

  • File time_series_anomaly_detection/detector.py contains Python module with TemplateDetector which you can use as base for your anomaly detector. As you can see the detector takes id_columns parameter in its constructor. Your detector should also take this parameter as it's necessary to fulfill requirements for the functionality of anomaly detector.

  • File tests/test_detector.py contains pytest module with simple tests that your detector must pass. Make sure that DETECTOR_CLASS points to your detector. In case your detector contains additional required parameters (in its constructor), modify existing tests so that these parameters are filled. Adding of additional unit tests is welcome but do not change predefined unit tests except for the mentioned exceptions.

  • The anomaly detector should be able to handle numerical data with missing values (nan values). In case the paper introducing the detector does not mention it and there is not a clear solution you can relax on it. For example in case the detector is working with certain window size, ignoring (window size - 1) samples after sample with a missing value is a possible solution (nan anomaly score should be returned for each ignored sample).

  • The anomaly detector must be able to handle multiple time series which are identified by the ID columns whose names are provided in the constructor argument id_columns. These columns should only be used to separate individual time series (not as feature columns). In case the paper introducing the detector does not mention training on multiple time series, try to come up with a reasonable solution. If there is not a clear reasonable solution you can relax on it.

  • Your solution must be in your github repository. You should develop your solution in a non-master branch and the pull request to master branch should be used as a place for our review.

  • Each function and class must be documented using numpy style docstring.

How to start

  1. Fork this repository. Create a new branch for the solution.

  2. Install poetry and read its documentation.

  3. Install poetry environment by running poetry install inside the project's folder.

  4. Rename TemplateDetector in time_series_anomaly_detection/detector to the name of your anomaly detector and start implementing it (the documentation of predict_anomaly_scores and fit is inherited from TimeSeriesAnomalyDetector and can be found in time_series_anomaly_detection/abstractions.py.

  5. Make sure that your detector passes all tests in tests/test_detector.py by running poetry run python -m pytest tests. First make sure that in the beginning of tests/test_detector.py constant DETECTOR_CLASS points to your anomaly detector and not to TemplateDetector (in case you renamed it). In case your detector contains additional required parameters (in its constructor), modify tests so that these parameters are filled.

  6. Create pull request of the solution branch to the master branch.

timeseriesanomalydetectionassignments's People

Contributors

jzizka91 avatar pall-j 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.