Skip to main content

Orion is a machine learning library built for data generated by satellites.

Project description

“DAI-Lab” An open source project from Data to AI Lab at MIT.


Development Status PyPi Shield Tests Downloads Binder



Orion is a machine learning library built for unsupervised time series anomaly detection. With a given time series data, we provide a number of “verified” ML pipelines (a.k.a Orion pipelines) that identify rare patterns and flag them for expert review.

The library makes use of a number of automated machine learning tools developed under Data to AI Lab at MIT.

Recent news: Read about using an Orion pipeline on NYC taxi dataset in a blog series:

Part 1: Learn about unsupervised time series anomaly detection Part 2: Learn how we use GANs to solving the problem? Part 3: How does one evaluate anomaly detection pipelines?

Notebooks: Discover Orion through colab by launching our notebooks!


Install with pip

The easiest and recommended way to install Orion is using pip:

pip install orion-ml

This will pull and install the latest stable release from PyPi.

In the following example we show how to use one of the Orion Pipelines.

Fit an Orion pipeline

We will load a demo data for this example:

from import load_signal

train_data = load_signal('S-1-train')

which should show a signal with timestamp and value.

    timestamp     value
0  1222819200 -0.366359
1  1222840800 -0.394108
2  1222862400  0.403625
3  1222884000 -0.362759
4  1222905600 -0.370746

In this example we use lstm_dynamic_threshold pipeline and set some hyperparameters (in this case training epochs as 5).

from orion import Orion

hyperparameters = {
    'keras.Sequential.LSTMTimeSeriesRegressor#1': {
        'epochs': 5,
        'verbose': True

orion = Orion(

Detect anomalies using the fitted pipeline

Once it is fitted, we are ready to use it to detect anomalies in our incoming time series:

new_data = load_signal('S-1-new')
anomalies = orion.detect(new_data)

:warning: Depending on your system and the exact versions that you might have installed some WARNINGS may be printed. These can be safely ignored as they do not interfere with the proper behavior of the pipeline.

The output of the previous command will be a pandas.DataFrame containing a table of detected anomalies:

        start         end  severity
0  1394323200  1399701600  0.673494


In every release, we run Orion benchmark. We maintain an up-to-date leaderboard with the current scoring of the verified pipelines according to the benchmarking procedure.

We run the benchmark on 11 datasets with their known grounth truth. We record the score of the pipelines on each datasets. To compute the leaderboard table, we showcase the number of wins each pipeline has over the ARIMA pipeline.

Pipeline Outperforms ARIMA
TadGAN 8
LSTM Dynamic Thresholding 8
LSTM Autoencoder 7
Dense Autoencoder 7
Azure 0

You can find the scores of each pipeline on every signal recorded in the details Google Sheets document. The summarized results can also be browsed in the following summary Google Sheets document.


Additional resources that might be of interest:


If you use Orion for your research, please consider citing the following paper:

Alexander Geiger, Dongyu Liu, Sarah Alnegheimish, Alfredo Cuesta-Infante, Kalyan Veeramachaneni. TadGAN - Time Series Anomaly Detection Using Generative Adversarial Networks.

  title={TadGAN: Time Series Anomaly Detection Using Generative Adversarial Networks},
  author={Geiger, Alexander and Liu, Dongyu and Alnegheimish, Sarah and Cuesta-Infante, Alfredo and Veeramachaneni, Kalyan},
  booktitle={2020 IEEE International Conference on Big Data (IEEE BigData)},


0.1.6 - 2021-02-08

This version introduces two new pipelines: LSTM AE and Dense AE. In addition to minor improvements, a bit of code refactoring took place to introduce a new primtive: reconstruction_errors.

Issues resolved

  • Comparison of DTW library performance - Issue #205 by @sarahmish
  • Not able to pickle dump tadgan pipeline - Issue #200 by @sarahmish
  • New pipeline LSTM and Dense autoencoders - Issue #194 by @sarahmish
  • Readme - Issue #192 by @pvk-developer
  • Unable to launch cli - Issue #186 by @sarahmish
  • bullet points not formatted correctly in index.rst - Issue #178 by @micahjsmith
  • Update notebooks - Issue #176 by @sarahmish
  • Inaccuracy in file in orion/evaluation/ - Issue #157 by @sarahmish
  • Dockerfile -- docker does not find orion primitives automatically - Issue #155 by @sarahmish
  • Primitive documentation - Issue #151 by @sarahmish
  • Variable name inconsistency in tadgan - Issue #150 by @sarahmish
  • Sync leaderboard tables between and the docs - Issue #148 by @sarahmish

0.1.5 - 2020-12-25

This version includes the new style of documentation and a revamp of the In addition to some minor improvements in the benchmark code and primitives. This release includes the transfer of tadgan pipeline to verified.

Issues resolved

  • Link with google colab - Issue #144 by @sarahmish
  • Add timeseries_anomalies unittests - Issue #136 by @sarahmish
  • Update find_sequences in converting series to arrays - Issue #135 by @sarahmish
  • Definition of error/critic smooth window in score anomalies primitive - Issue #132 by @sarahmish
  • Train-test split in benchmark enhancement - Issue #130 by @sarahmish

0.1.4 - 2020-10-16

Minor enhancements to benchmark

  • Load ground truth before try-catch - Issue #124 by @sarahmish
  • Converting timestamp to datetime in Azure primitive - Issue #123 by @sarahmish
  • Benchmark exceptions - Issue #120 by @sarahmish

0.1.3 - 2020-09-29

New benchmark and Azure primitive.

  • Implement a benchmarking function new feature - Issue #94 by @sarahmish
  • Add azure anomaly detection as primitive new feature - Issue #97 by @sarahmish
  • Critic and reconstruction error combination - Issue #99 by @sarahmish
  • Fixed threshold for find_anomalies - Issue #101 by @sarahmish
  • Add an option to have window size and window step size as percentages of error size - Issue #102 by @sarahmish
  • Organize pipelines into verified and sandbox - Issue #105 by @sarahmish
  • Ground truth parameter name enhancement - Issue #114 by @sarahmish
  • Add benchmark dataset list and parameters to s3 bucket enhancement - Issue #118 by @sarahmish

0.1.2 - 2020-07-03

New Evaluation sub-package and refactor TadGAN.

  • Two bugs when saving signalrun if there is no event detected - Issue #92 by @dyuliu 
  • File encoding/decoding issues about and - Issue #88 by @dyuliu
  • Fix bottle neck of score_anomaly in Cyclegan primitive - Issue #86 by @dyuliu
  • Adjust epoch meaning in Cyclegan primitive - Issue #85 by @sarahmish
  • Rename evaluation to benchmark and metrics to evaluation - Issue #83 by @sarahmish
  • Scoring function for intervals of size one - Issue #76 by @sarahmish

0.1.1 - 2020-05-11

New class and function based interfaces.

  • Implement the Orion Class - Issue #79 by @csala
  • Implement new functional interface - Issue #80 by @csala

0.1.0 - 2020-04-23

First Orion release to PyPI:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for orion-ml, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size orion_ml-0.1.6-py2.py3-none-any.whl (104.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size orion-ml-0.1.6.tar.gz (1.0 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page