Browse Source

update docs

Former-commit-id: a5f7230ede [formerly f95e3d68e1] [formerly 59ecc3d00c [formerly 9d4d330eb6]] [formerly ecdac83d6f [formerly 283dd77be7] [formerly 257b382eab [formerly fa92ea3316]]] [formerly c356a14f1e [formerly bc399172be] [formerly de0639764a [formerly a21d5f4b72]] [formerly bb5a99a378 [formerly c24d22e34c] [formerly 8e40bf975b [formerly 4713d44365]]]] [formerly 7e6fff31da [formerly 263493fb8b] [formerly b3157a0cf6 [formerly 93a1deffe8]] [formerly 677bbf0e98 [formerly b3dda23162] [formerly ad1311ba17 [formerly a084f42a03]]] [formerly 4158770bca [formerly 8ee86965d4] [formerly 3c5a17dc5a [formerly 888390b257]] [formerly 99dec25295 [formerly 59d735f095] [formerly c1bc262103 [formerly 179cb79b98]]]]] [formerly d429a3e99b [formerly f2c078328d] [formerly 7b43a339f9 [formerly 5ff61cbe9b]] [formerly 20c196656d [formerly 547ef491e8] [formerly 64948ad96b [formerly 7c5acb40c5]]] [formerly 15476a5e4c [formerly 7b8e5e69e0] [formerly c5becb5391 [formerly 67a2c86cce]] [formerly 724a7d67cd [formerly 94a9adf942] [formerly e062285b83 [formerly 380e9f198a]]]] [formerly 27679e19b5 [formerly 8d1dffe6cb] [formerly 217d75f034 [formerly bfd497c2f8]] [formerly ebcf922728 [formerly 64429c06d8] [formerly 74417071a4 [formerly 79ae165000]]] [formerly 3ea575bac1 [formerly 298c193d81] [formerly 2820c941d9 [formerly d903304ea3]] [formerly cdac59b2b7 [formerly edc15796b8] [formerly 1f2b58f696 [formerly ea3a3245b6]]]]]]
Former-commit-id: 21bf49d988 [formerly 17530bc081] [formerly de3f736bbf [formerly e415cc06aa]] [formerly cdc5d91c47 [formerly 617ce36a45] [formerly a55947da4d [formerly 80fcf32a21]]] [formerly 47aed3ddc7 [formerly c57ad7d488] [formerly b64eba1e4b [formerly a437b32ad7]] [formerly bab02916a4 [formerly c104d2867c] [formerly f48fa96296 [formerly 404dc5f88a]]]] [formerly e65e02c86d [formerly 7d10e2b25f] [formerly 8d0a5d240a [formerly cae0267091]] [formerly 67f9a67916 [formerly 7142943269] [formerly f035b9bea0 [formerly ed250b673b]]] [formerly 5b0cb463c8 [formerly 2621f8ddd2] [formerly 1258c415a6 [formerly 1ddf210aae]] [formerly 572b6a2903 [formerly 3fe837f426] [formerly 1f2b58f696]]]]
Former-commit-id: 8682466273 [formerly e2d3d6db28] [formerly 8c1b56c255 [formerly 6eda5986c3]] [formerly 705890c35e [formerly c276ef25f2] [formerly 7a6b1aee6a [formerly 21c27e12db]]] [formerly 93f76b2e5e [formerly 878474b504] [formerly c1b2bf92e6 [formerly 36c04290d1]] [formerly 3f3a911121 [formerly 11a5860d0e] [formerly 110aa2ecd6 [formerly b72761d6b7]]]]
Former-commit-id: 78ae0319c1 [formerly 54e0e43c7d] [formerly f1129426aa [formerly bc8ef441cc]] [formerly a1b736f0e7 [formerly ea53de0f45] [formerly a22fb7400f [formerly 9f0a835e29]]]
Former-commit-id: 571861eb33 [formerly 01fa8af403] [formerly 8d8a812d86 [formerly 3c93bc8c52]]
Former-commit-id: 79dbc73d89 [formerly d6b6cbd4c3]
Former-commit-id: c7b026235f
master
lhenry15 4 years ago
parent
commit
5fb074557f
19 changed files with 100 additions and 122 deletions
  1. +0
    -20
      docs/Makefile
  2. +0
    -39
      docs/\
  3. +0
    -0
      docs/conf.py
  4. +0
    -0
      docs/doctree.rst
  5. +0
    -0
      docs/getting_started.rst
  6. +0
    -0
      docs/img/tods_framework.pdf
  7. +100
    -0
      docs/index.rst
  8. +0
    -35
      docs/make.bat
  9. +0
    -0
      docs/modules.rst
  10. +0
    -0
      docs/overview.rst
  11. +0
    -28
      docs/source/index.rst
  12. +0
    -0
      docs/tods.data_processing.rst
  13. +0
    -0
      docs/tods.detection_algorithm.rst
  14. +0
    -0
      docs/tods.feature_analysis.rst
  15. +0
    -0
      docs/tods.reinforcement.rst
  16. +0
    -0
      docs/tods.rst
  17. +0
    -0
      docs/tods.searcher.rst
  18. +0
    -0
      docs/tods.searcher.search.rst
  19. +0
    -0
      docs/tods.timeseries_processing.rst

+ 0
- 20
docs/Makefile View File

@@ -1,20 +0,0 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

+ 0
- 39
docs/\ View File

@@ -1,39 +0,0 @@
Overview
========

Design Principles
~~~~~~~~~~~~~~~~~

TODS follows the design principal of `D3M <http://datadrivendiscovery.org/>`_.
The toolkit wraps each function into ``Primitive`` class with unified
interfaces. The goal of this toolkit is to enable the users to easily develop
outlier detection system for time series data. The following design principles
are applied when developing the toolkit:
* **.** Results on the environments can be reproduced. The same result should be obtained with the same random seed in different runs.
* **Accessible.** The experiences are collected and well organized after each game with easy-to-use interfaces. Uses can conveniently configure state representation, action encoding, reward design, or even the game rules.
* **Scalable.** New card environments can be added conveniently into the toolkit with the above design principles. We also try to minimize the dependencies in the toolkit so that the codes can be easily maintained.

TODS High-level Design
~~~~~~~~~~~~~~~~~~~~~~~~


.. image:: img/framework.pdf
:width: 800



Data Processing
---------------


Timeseries Processing
---------------------

Feature Analysis
----------------

Detection Algorithms
---------------------

Reincforcement
--------------

docs/source/conf.py → docs/conf.py View File


docs/source/doctree.rst → docs/doctree.rst View File


docs/source/getting_started.rst → docs/getting_started.rst View File


docs/source/img/tods_framework.pdf → docs/img/tods_framework.pdf View File


+ 100
- 0
docs/index.rst View File

@@ -0,0 +1,100 @@
.. Time Series Outlier Detection System documentation master file, created by
sphinx-quickstart on Wed Sep 9 22:52:15 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to TOD's documentation!
================================================================
TODS is a full-stack automated machine learning system for outlier detection on multivariate time-series data. TODS provides exahaustive modules for building machine learning-based outlier detection systems including: data processing, time series processing, feature analysis (extraction), detection algorithms, and reinforcement module. The functionalities provided via these modules including: data preprocessing for general purposes, time series data smoothing/transformation, extracting features from time/frequency domains, various detection algorithms, and involving human expertises to calibrate the system. Three common outlier detection scenarios on time-series data can be performed: point-wise detection (time points as outliers), pattern-wise detection (subsequences as outliers), and system-wise detection (sets of time series as outliers), and wide-range of corresponding algorithms are provided in TODS. This package is developed by `DATA Lab @ Texas A&M University <https://people.engr.tamu.edu/xiahu/index.html>`__.

TODS is featured for:

* **Full Sack Machine Learning System** which supports exhaustive components from preprocessings, feature extraction, detection algorithms and also human-in-the loop interface.

* **Wide-range of Algorithms**, including all of the point-wise detection algorithms supported by `PyOD <https://github.com/yzhao062/pyod>`__, state-of-the-art pattern-wise (collective) detection algorithms such as `DeepLog <https://www.cs.utah.edu/~lifeifei/papers/deeplog.pdf>`__, `Telemanon <https://arxiv.org/pdf/1802.04431.pdf>`__, and also various ensemble algorithms for performing system-wise detection.

* **Automated Machine Learning** aims on providing knowledge-free process that construct optimal pipeline based on the given data by automatically searching the best combination from all of the existing modules.

Installation
-----------
This package works with **Python 3.6** and pip 19+. You need to have the following packages installed on the system (for Debian/Ubuntu):
::
sudo apt-get install libssl-dev libcurl4-openssl-dev libyaml-dev build-essential libopenblas-dev libcap-dev ffmpeg

Then execute ``python setup.py install``, the script will then install all of the packges to build up TODS.



.. toctree::
:maxdepth: 4
:caption: Contents:

Examples
--------
Examples are available in `examples <https://github.com/datamllab/tods/tree/master/examples>`__. For basic usage, you can evaluate a pipeline on a given datasets. Here, we provide an example to load our default pipeline and evaluate it on a subset of yahoo dataset.

.. code:: python

import pandas as pd

from tods import schemas as schemas_utils
from tods.utils import generate_dataset_problem, evaluate_pipeline

table_path = 'datasets/yahoo_sub_5.csv'
target_index = 6 # what column is the target
#table_path = 'datasets/NAB/realTweets/labeled_Twitter_volume_IBM.csv' # The path of the dataset
time_limit = 30 # How many seconds you wanna search
#metric = 'F1' # F1 on label 1
metric = 'F1_MACRO' # F1 on both label 0 and 1

# Read data and generate dataset and problem
df = pd.read_csv(table_path)
dataset, problem_description = generate_dataset_problem(df, target_index=target_index, metric=metric)

# Load the default pipeline
pipeline = schemas_utils.load_default_pipeline()

# Run the pipeline
pipeline_result = evaluate_pipeline(problem_description, dataset, pipeline)


We also provide AutoML support to help you automatically find a good pipeline for a your data.


.. code:: python

import pandas as pd

from axolotl.backend.simple import SimpleRunner

from tods.utils import generate_dataset_problem
from tods.search import BruteForceSearch

# Some information
#table_path = 'datasets/NAB/realTweets/labeled_Twitter_volume_GOOG.csv' # The path of the dataset
#target_index = 2 # what column is the target

table_path = 'datasets/yahoo_sub_5.csv'
target_index = 6 # what column is the target
#table_path = 'datasets/NAB/realTweets/labeled_Twitter_volume_IBM.csv' # The path of the dataset
time_limit = 30 # How many seconds you wanna search
#metric = 'F1' # F1 on label 1
metric = 'F1_MACRO' # F1 on both label 0 and 1

# Read data and generate dataset and problem
df = pd.read_csv(table_path)
dataset, problem_description = generate_dataset_problem(df, target_index=target_index, metric=metric)

# Start backend
backend = SimpleRunner(random_seed=0)

# Start search algorithm
search = BruteForceSearch(problem_description=problem_description, backend=backend)

# Find the best pipeline
best_runtime, best_pipeline_result = search.search_fit(input_data=[dataset], time_limit=time_limit)
best_pipeline = best_runtime.pipeline
best_output = best_pipeline_result.output

# Evaluate the best pipeline
best_scores = search.evaluate(best_pipeline).scores

+ 0
- 35
docs/make.bat View File

@@ -1,35 +0,0 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

docs/source/modules.rst → docs/modules.rst View File


docs/source/overview.rst → docs/overview.rst View File


+ 0
- 28
docs/source/index.rst View File

@@ -1,28 +0,0 @@
.. Time Series Outlier Detection System documentation master file, created by
sphinx-quickstart on Wed Sep 9 22:52:15 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to TOD's documentation!
================================================================

.. toctree::
:maxdepth: 4
:caption: Contents:



API Documents
==================
.. toctree::
:maxdepth: 4
:caption: API Documents:
tods.data_processing
tods.timeseries_processing
tods.feature_analysis
tods.detection_algorithm
tods.reinforcement

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

docs/source/tods.data_processing.rst → docs/tods.data_processing.rst View File


docs/source/tods.detection_algorithm.rst → docs/tods.detection_algorithm.rst View File


docs/source/tods.feature_analysis.rst → docs/tods.feature_analysis.rst View File


docs/source/tods.reinforcement.rst → docs/tods.reinforcement.rst View File


docs/source/tods.rst → docs/tods.rst View File


docs/source/tods.searcher.rst → docs/tods.searcher.rst View File


docs/source/tods.searcher.search.rst → docs/tods.searcher.search.rst View File


docs/source/tods.timeseries_processing.rst → docs/tods.timeseries_processing.rst View File


Loading…
Cancel
Save