{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "9286e0b8-3c78-4b0f-943c-d219e9840dfe", "metadata": { "papermill": { "duration": 0.014825, "end_time": "2024-01-31T17:50:26.847199", "exception": false, "start_time": "2024-01-31T17:50:26.832374", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "# Import to be able to import python package from src\n", "import sys\n", "sys.path.insert(0, '../src')" ] }, { "cell_type": "code", "execution_count": 3, "id": "2028eed7-b1c3-4c9e-b6a0-00433caa7d0f", "metadata": { "papermill": { "duration": 2.515115, "end_time": "2024-01-31T17:50:29.365394", "exception": false, "start_time": "2024-01-31T17:50:26.850279", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "The `LightGBM` module could not be imported. To enable LightGBM support in Darts, follow the detailed instructions in the installation guide: https://github.com/unit8co/darts/blob/master/INSTALL.md\n", "The `Prophet` module could not be imported. To enable Prophet support in Darts, follow the detailed instructions in the installation guide: https://github.com/unit8co/darts/blob/master/INSTALL.md\n" ] } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "import ontime as on" ] }, { "cell_type": "markdown", "id": "41296cc6-9d84-47c5-8a92-2d292f6f3c4a", "metadata": { "papermill": { "duration": 0.008378, "end_time": "2024-01-31T17:50:26.827798", "exception": false, "start_time": "2024-01-31T17:50:26.819420", "status": "completed" }, "tags": [] }, "source": [ "# Detectors" ] }, { "cell_type": "markdown", "id": "48992359-bd13-4347-8344-8bfb42fb126c", "metadata": {}, "source": [ "Detectors allow you to get a signal given a condition. The condition can be :\n", "\n", "- an absolute threshold or,\n", "- a statistical threshold with a quantile.\n", "\n", "Let's make an example." ] }, { "cell_type": "markdown", "id": "e24da8ab-6a83-4c2f-9ff0-c633d4693a91", "metadata": { "papermill": { "duration": 0.001714, "end_time": "2024-01-31T17:50:29.375771", "exception": false, "start_time": "2024-01-31T17:50:29.374057", "status": "completed" }, "tags": [] }, "source": [ "## Generate a TimeSeries\n", "\n", "This is only to have some data for the purpose of the example." ] }, { "cell_type": "code", "execution_count": 4, "id": "e9a96d79-0423-4d79-b01d-726193216238", "metadata": { "papermill": { "duration": 0.006608, "end_time": "2024-01-31T17:50:29.384080", "exception": false, "start_time": "2024-01-31T17:50:29.377472", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "ts = on.generators.random_walk().generate(start=pd.Timestamp('2022-01-01'), end=pd.Timestamp('2022-12-31'))" ] }, { "cell_type": "code", "execution_count": 5, "id": "d463df9c-4f02-4c1e-b1a5-7162b9ea8c63", "metadata": { "papermill": { "duration": 0.009125, "end_time": "2024-01-31T17:50:29.394914", "exception": false, "start_time": "2024-01-31T17:50:29.385789", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<TimeSeries (DataArray) (time: 3, component: 1, sample: 1)>\n",
       "array([[[-0.00377122]],\n",
       "\n",
       "       [[ 0.40349093]],\n",
       "\n",
       "       [[ 2.47072711]]])\n",
       "Coordinates:\n",
       "  * time       (time) datetime64[ns] 2022-01-01 2022-01-02 2022-01-03\n",
       "  * component  (component) object 'random_walk'\n",
       "Dimensions without coordinates: sample\n",
       "Attributes:\n",
       "    static_covariates:  None\n",
       "    hierarchy:          None
" ], "text/plain": [ "\n", "array([[[-0.00377122]],\n", "\n", " [[ 0.40349093]],\n", "\n", " [[ 2.47072711]]])\n", "Coordinates:\n", " * time (time) datetime64[ns] 2022-01-01 2022-01-02 2022-01-03\n", " * component (component) object 'random_walk'\n", "Dimensions without coordinates: sample\n", "Attributes:\n", " static_covariates: None\n", " hierarchy: None" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ts.head(3)" ] }, { "cell_type": "markdown", "id": "5af625dd-ba6b-4f3b-9f42-462fe8918c5a", "metadata": { "papermill": { "duration": 0.001865, "end_time": "2024-01-31T17:50:29.406225", "exception": false, "start_time": "2024-01-31T17:50:29.404360", "status": "completed" }, "tags": [] }, "source": [ "## Detection given an abolute threshold" ] }, { "cell_type": "markdown", "id": "d90f942f-00ee-4953-81e2-795e3d87b292", "metadata": {}, "source": [ "With a single line of code, you can make your absolute detector." ] }, { "cell_type": "code", "execution_count": 6, "id": "8310ade1-a382-4d2a-b139-0331b3b8ebed", "metadata": { "papermill": { "duration": 0.004788, "end_time": "2024-01-31T17:50:29.412834", "exception": false, "start_time": "2024-01-31T17:50:29.408046", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "td = on.detectors.threshold(low_threshold=-2)" ] }, { "cell_type": "markdown", "id": "dc43b9bf-8736-4f90-8089-393ecdd2289f", "metadata": {}, "source": [ "Now, a detection on any TimeSeries can be made as follow : " ] }, { "cell_type": "code", "execution_count": 7, "id": "15399a30-e23e-4dae-ac55-f6376f1f23e6", "metadata": {}, "outputs": [], "source": [ "ats = td.detect(ts)" ] }, { "cell_type": "markdown", "id": "7cd14648-4b33-4e49-94f1-2c30ead74886", "metadata": {}, "source": [ "The return type of the detect function is a BinaryTimeSeries, meaning that it will always have values being 0 or 1." ] }, { "cell_type": "code", "execution_count": 8, "id": "5b3d020e-18cc-47f2-a553-eb00ff972ef3", "metadata": { "papermill": { "duration": 0.197344, "end_time": "2024-01-31T17:50:29.612099", "exception": false, "start_time": "2024-01-31T17:50:29.414755", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "ontime.core.time_series.binary_time_series.BinaryTimeSeries" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(ats)" ] }, { "cell_type": "code", "execution_count": 9, "id": "e1ffc02f-1ec9-4bd2-8fec-c8bfd3909ed9", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAGvCAYAAABih26MAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAA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LXrmmWf0i1/8wuh6KSkpAR0XlACpra1VXFyc73FcXJxqampaPD43N1czZszwH1gQV0DKysqUnJwccKU1dvnll/s9jo7+vyl0uVzq379/q+c3Pr6x5cuXKzU1VZK0c+dOPf/88377e/Xq5Yubu+++W7W1terSpctFn68trM5RZ8N8BY65MsecBS4c52rYsGGqqKhw/HmTkpK0d+/eVo85P1+9e/fWF198occee8zvPWXMmDEqLi4OyvuMFKQAiY2N9fubu9vtlsvlavH4mJiYoMRGayIjI9v0G7S1cyIiIi56zZb2Z2Zm+m7fnDp1qsn+uLg4TZkyRZLUpUsX1dbWyuv1BvUPWVvnqLNivgLHXJljzgIXTnNVUVGhb775JiTPHegcfPfdd2poaFCfPn38zklKStLXX38dtLkMSoCkpqZq//79vtswJSUlvr/do3kRERHN/rq1/V6vN/gDAwC0WVJSUqd6XhNGAXLu3Dk1NDTI4/GooaFBZ86cUXR0tKKiovyOy87O1ssvv6ybb75Z1dXVeuutt7R48WI7x93hECAA0PHs27cv1EO4qMTEREVFRamystJve2VlZVBDxmhd5aWXXtItt9yit956S+vWrdMtt9yirVu36tNPP9WIESN8x02dOlU33XSTJk+erH/6p3/ST3/60w7zLbjBQoAAAEIhJiZGN910kz744APfNo/How8++EA/+tGPgva8Risgc+bM0Zw5c5rdV1hY6Pt1ZGSk5s2bp3nz5lkbXSdCgAAAQuWhhx7SPffco6FDh2rYsGF69tln5Xa7lZubG7TnDMpnQGCOAAEAhMqdd96pI0eO6LHHHlNFRYWuv/56vfvuu+rdu3fQnpMACRMECAAglObOnau5c+c69nzh8X1KIEAAAJ0KARImCBAAQGdCgIQJAgQA0JkQIGGCAAEAdCYESJggQAAAnQkB4jA7o4EAAQC0VwSIw1qKBlZAAACdCQHiMAIEAAACxHEECAAABIixC9/0Gz8OJAgIEAAACJCw0ZYAAQCgvSJADF345m8aBqyAAABAgDiOAAEAgABxHAECAAAB4jgCBAAAAsRxBAgAAASI4wgQAAAIEMcRIAAAECCOI0AAACBAHEeAAABAgDiO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rkkUc0b948jRw5UrNmzVJ5eXmIX03w/fSnP9X69eub/cvP66+/rkmTJunWW2/VwoULVV1dLUm677779M477/iOO7+KWVFR4di4nRCs98N+/fopNjZWkhQRESFJtv2FvF0HyIUOHTqkU6dOKTk5WQcPHtSgQYN8+9LS0lRSUtLseZ9++qlSU1Ob3Xfq1CmVlJS0uL89Gjp0qEpKSnT8+HEdP35c+/fv17Bhw3z7BwwYoJdfflkffPCBhg8frkWLFvmdv3PnTuXn5+v11193euiOa+tcjRo1Sl9//bWqqqokSWfOnFFBQYHGjh0bkteB8NS/f3+dPXtWTzzxhPbs2eN705SkV155RZ9++qlefvllvfnmmyouLtabb77p2/+nP/1Jd9xxhz744ANdd911Tf6cdkRDhw5VUlKStmzZ4rd9z549Wrt2rVasWKEtW7aorq5OTz31lCTptttu0/bt233HFhYWKi0tTUlJSY6O3Wl2vh9u2LBB6enpmjJlinr16mXb57Y6TIDU1dVp4cKFmjlzprp3766amhrFxcX59sfFxfndyz+vrKxML7zwgu6///4m+zwejx5//HFlZmYqJSUlqON3UlRUlDIzM/X+++/r/fffV2Zmpt+Sb2ZmphISEhQdHe37W31NTY1v/1133aWePXuqW7duoRi+o9o6V926dVNGRobef/99SVJRUZEGDhyoK664IlQvBWGoe/fu+s1vfqP6+notWrRIt912mxYuXCi3263NmzfrF7/4hRISEnTJJZfo7rvv1gcffOA79wc/+IFGjBihLl26aM6cOfr888/97t13VLNmzWqyCvL+++9rypQpSk1NVWxsrO6//35t375dXq9Xo0eP1ieffKJTp05JkrZv364xY8aEaviOsPv9cObMmSosLNSGDRuUmZmp6OhoW8Zpz1VC7Ny5c5o/f76Sk5M1a9YsSd9/jsPtdvuOcbvdvmWk844cOaK5c+fq3nvv1Q9/+MMm133yySdVXV2tpUuXBvcFhEB2draeeuopeb1ePfzww/J4PL59mzZt0quvvqrKykpFRETI6/Xq5MmTcrlckqTevXuHatgh0da5Gj9+vFatWqW7775b7733HqsfaFZaWpqeeOIJSdJXX32l+fPna926daqoqNADDzzgW/b2er3q1auX77zGfw67deum+Ph4HT16VJdffrmzL8Bhw4YN0+WXX+53W+Xo0aP6wQ9+4Hvcp08fnTlzRidPntSll16qG264QTt37tRtt92m3bt361e/+lUohu6IYL0fRkRE6LrrrtPWrVu1adMmTZs2zfJY232AeDweLVy4UBEREVq8eLHvD2tKSor279+vjIwMSVJJSYkGDhzoO+/EiRO67777NHnyZP3kJz9pct3nnntOxcXFevHFFxUTE+PMi3HQNddco5MnT0qSrr32Wt89v/Lycj399NP6zW9+o8GDB6u+vl4jRozwfWJa+r/7gJ1FW+fqhz/8oaqqqlRcXKw9e/ZowYIFIXsNoRQbG6szZ874Hh87diyEowlvV199tUaPHq2SkhL16tVLS5cu1eDBg5s9trKy0vfruro6nTx5stN8QHrWrFlaunSpbrrpJklSYmKi33xUVFSoa9euio+PlySNGTNG7733nrp27aqrr766w85TsN4PG2toaFBZWZkt4233t2CWLFmiY8eO6cknn/RbFho/frw2btyow4cP69ixY3rllVc0fvx4Sd9/6nfu3LlKT0/XzJkzm1xz7dq1Kioq0sqVK/2WrTqa5cuXa/ny5X7bampqFBkZqYSEBN+H4NC2uYqKitKYMWP02GOP6frrr1dCQoKTQw4bgwYN0ocffqjq6modPnyY72Jo5O9//7teeeUV362T0tJS/fd//7euvfZaTZw4UatWrdLRo0fl9XpVXl6ujz/+2HfuZ599pqKiIp09e1Zr1qzRtdde2+FXP867+eab1bNnT+3atUvS94GxadMmHTx4ULW1tVq1apVuvfVW3xvwqFGj9Ne//lVvvvlmh779Eoz3w02bNun06dPyeDzat2+f3n333WZXSNqiXa+AfPvtt3rrrbfUtWtX3Xrrrb7tK1euVHp6uqZOnap77rlHHo9Hd9xxhyZNmiTp+2+lLC4uVmlpqd544w3feed/3sfq1avVpUsXv5/18Mgjjyg7O9uhV+aM5j5Ym5aWpilTpuiuu+5SbGys/vmf/1ldunQJwejCS1vnavz48fr973+ve+65x6mhhp3x48dr9+7dmjBhggYMGKCxY8fqf/7nf0I9rLDgcrn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VCuf8011+jDDz9UVFSUlixZ4lspcbvd2rlzp0aPHh2U5wXgHAIEgLEBAwZIkr788kvdeeedio2N1axZs2y7/vTp07V582ZVVVXpJz/5iVJSUuR2u1VZWalz587p9ttvt+25AIQGH0IFYGzixInKzMxU9+7dVVJSoi+++EIej8e26yckJGj9+vXKyclRfHy8SkpKdObMGd1www166KGHbHseAKHDzwEBAACOYwUEAAA4jgABAACOI0AAAIDjCBAAAOA4AgQAADiOAAEAAI4jQAAAgOMIEAAA4DgCBAAAOI4AAQAAjiNAAACA4/4/92lW1LPlkmwAAAAASUVORK5CYII=", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ats.plot();" ] }, { "cell_type": "markdown", "id": "ffbed9d6-d331-4708-8d50-25882c85e60d", "metadata": { "papermill": { "duration": 0.005612, "end_time": "2024-01-31T17:50:29.624161", "exception": false, "start_time": "2024-01-31T17:50:29.618549", "status": "completed" }, "tags": [] }, "source": [ "## Detection given a statistical threshold (quantile)" ] }, { "cell_type": "markdown", "id": "22fa051a-a00a-454b-bfb9-844bb32b9d06", "metadata": {}, "source": [ "Here the idea is similar but the threshold is dependant on the data. The quantile detector can be instanciated as follow" ] }, { "cell_type": "code", "execution_count": 10, "id": "04f2a0c4-5744-46bf-b622-9abaaaf6b35c", "metadata": { "papermill": { "duration": 0.016249, "end_time": "2024-01-31T17:50:29.649601", "exception": false, "start_time": "2024-01-31T17:50:29.633352", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "td = on.detectors.quantile(low_quantile=0.1)" ] }, { "cell_type": "markdown", "id": "675ff78a-4f74-494e-a049-8b239505ab69", "metadata": {}, "source": [ "And then, it can be fit" ] }, { "cell_type": "code", "execution_count": 11, "id": "02f12ec0-d1cc-41db-ba53-c53a98f6d8f3", "metadata": { "papermill": { "duration": 0.015824, "end_time": "2024-01-31T17:50:29.671330", "exception": false, "start_time": "2024-01-31T17:50:29.655506", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "td.fit(ts)" ] }, { "cell_type": "markdown", "id": "92a54b62-d159-47c1-b493-3d008e17e350", "metadata": {}, "source": [ "Now, the usage is similar to the threshold detector." ] }, { "cell_type": "code", "execution_count": 12, "id": "df0896b7-7857-42ad-9dd2-c831f8fa0123", "metadata": {}, "outputs": [], "source": [ "ats = td.detect(ts)" ] }, { "cell_type": "markdown", "id": "eca142b6-79bc-444f-96c4-d2872361b8a4", "metadata": {}, "source": [ "The TimeSeries is also a BinaryTimeSeries with values being 0 or 1." ] }, { "cell_type": "code", "execution_count": 13, "id": "caebf894-6cf9-4937-8748-19edd8123ac5", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "ontime.core.time_series.binary_time_series.BinaryTimeSeries" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(ats)" ] }, { "cell_type": "code", "execution_count": 14, "id": "d640d149-f0eb-4d19-9e2b-10926d6fa26f", "metadata": { "papermill": { "duration": 0.159713, "end_time": "2024-01-31T17:50:29.836523", "exception": false, "start_time": "2024-01-31T17:50:29.676810", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAGvCAYAAABih26MAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAxlUlEQVR4nO3de3SU9YH/8U8uhNwgxkQS1AAJYdVqrVYE+yMYCAqGm0IB3eKpZLsYq6w53rrgKYp1F2W9UFmlpiCwVWutCiIWUHEJm7hQ6q3qtukuQUMQc+EWzCQhkMnvD0/GDJl5Mk8y32cG5v06Z88mz22+8xU6b7/PkxjV0dHRIQAAAAdFh3oAAAAg8hAgAADAcQQIAABwHAECAAAcR4AAAADHESAAAMBxBAgAAHAcAQIAABwXcQHidrv1+eefy+12h3ooYYs5sof5ChxzZR9zFjjmyp5Qz1fEBQgAAAg9AgQA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frpptuUnl5uePvzZRp06YpLy9PLS0tnm2tra26+uqrNW3atBCOLPwwV30zbdo0ffzxx6EeRtj78MMPNW/ePOXn52vChAm67bbb9OWXX4Z6WGFn2rRpmjp1qk6ePOnZtnTpUpWWloZwVOHD1OdhaWmp55ozZszQxo0bgzbm0zpA2tvbde655+q5557T9u3b9fd///e666671NzcrIqKCr3yyitat26dfv/73+u///u/PRPX1NSk8ePHa/369dqyZYsGDRqkJUuWeK6bmJioFStWqKysTPfee68WL158Rv0PwqBBg1RWVub5vqysTOnp6bav0/V/CM5UwZorwJempibdc889+vGPf6zt27dr06ZNuvHGGxUTExPqoYWl5uZmvfHGG6EeRlgy9XlYWFioV199VTt27NAvf/lLrVy5Unv27AnKmE/rAElISND8+fOVmZmp6OhoTZo0Sf369VN1dbU2b96sGTNm6Pzzz1d6erpuvvlmbd68WZJ0ySWXaPr06Ro4cKDi4uI0Z84cffrpp57rFhcXa+jQoYqOjtbIkSOVk5OjysrKUL3NoJs0aZK2bNni+X7Lli267rrrPN+vWbNGU6dOVX5+voqKivR///d/nn3Tpk3Tf/zHf2jWrFmaMWOGo+MOhd7O1datW3Xrrbd6XevBBx/UmjVrnBl4GFmyZIlWr17t+X7Tpk26/fbbQzii8FFdXa24uDgVFBQoOjpaiYmJGj9+vDIzM9Xe3q7S0lJNnTpVEydO1PLlyz3RX1paqvvvv1/33HOPrr76as2fP18HDhwI8bsx70c/+pHWrl3r819+XnnlFV1//fW65pprtHjxYjU1NUmSbr/9dr355pue4zpXMWtrax0btxNMfR4OGTJECQkJkqSoqChJCtq/kJ/WAXKqffv26dixY8rKytLnn3+uESNGePbl5uaqqqrK53kfffSRcnJyfO47duyYqqqq/O4/HY0cOVJVVVU6cuSIjhw5oj179mjUqFGe/cOGDdPzzz+vd999V6NHj9aDDz7odf727dtVWlqqV155xemhO663czVu3Dj97W9/U319vSTp+PHjKisr06RJk0LyPhCehg4dqhMnTujhhx/Wrl27PB+akvTiiy/qo48+0vPPP6/XXntNlZWVeu211zz7//M//1M33HCD3n33XV1yySXd/p6eiUaOHKnMzExt2rTJa/uuXbu0evVqLV++XJs2bVJra6sef/xxSdK1116rd955x3NseXm5cnNzlZmZ6ejYnRbMz8N169YpLy9PM2fO1KBBg4L23NYZEyCtra1avHix5s2bp+TkZDU3NyspKcmzPykpyetefqeamho988wzuuOOO7rtc7vdeuihh1RQUKDs7Gyj43dSTEyMCgoK9Pbbb+vtt99WQUGB15JvQUGBUlNTFRsb6/m3+ubmZs/+m266SWlpaYqPjw/F8B3V27mKj49Xfn6+3n77bUlSRUWFhg8frvPOOy9UbwVhKDk5Wb/+9a/V1tamBx98UNdee60WL14sl8uljRs36qc//alSU1M1YMAA3XzzzXr33Xc951566aUaO3as+vXrp+LiYn366ade9+7PVPPnz++2CvL2229r5syZysnJUUJCgu644w6988476ujo0Pjx4/Xhhx/q2LFjkqR33nlHEydODNXwHRHsz8N58+apvLxc69atU0FBgWJjY4MyzuBcJcROnjyphQsXKisrS/Pnz5f0zXMcLpfLc4zL5fIsI3VqaGjQggULdNttt+nKK6/sdt1HH31UTU1NeuSRR8y+gRAoLCzU448/ro6ODt17771yu92efRs2bNBLL72kuro6RUVFqaOjQ42NjUpMTJQkZWRkhGrYIdHbuZo8ebJWrlypm2++WW+99RarH/ApNzdXDz/8sCTpr3/9qxYuXKg1a9aotrZWd955p2fZu6OjQ4MGDfKc1/XvYXx8vFJSUnTw4EGdc845zr4Bh40aNUrnnHOO122VgwcP6tJLL/V8P3jwYB0/flyNjY0666yzdPnll2v79u269tprtXPnTv3sZz8LxdAdYerzMCoqSpdccok2b96sDRs2aPbs2X0e62kfIG63W4sXL1ZUVJSWLFni+cuanZ2tPXv2KD8/X5JUVVWl4cOHe847evSobr/9ds2YMUM//OEPu133qaeeUmVlpX71q18pLi7OmTfjoO985ztqbGyUJF188cWee34HDhzQE088oV//+te68MIL1dbWprFjx3qemJa+vQ8YKXo7V1deeaXq6+tVWVmpXbt2adGiRSF7D6GUkJCg48ePe74/dOhQCEcT3i666CKNHz9eVVVVGjRokB555BFdeOGFPo+tq6vzfN3a2qrGxsaIeUB6/vz5euSRR3TFFVdIktLT073mo7a2Vv3791dKSookaeLEiXrrrbfUv39/XXTRRWfsPJn6POyqvb1dNTU1QRnvaX8LZunSpTp06JAeffRRr2WhyZMna/369dq/f78OHTqkF198UZMnT5b0zVO/CxYsUF5enubNm9ftmqtXr1ZFRYVWrFjhtWx1pnnsscf02GOPeW1rbm5WdHS0UlNTPQ/BoXdzFRMTo4kTJ+qBBx7QZZddptTUVCeHHDZGjBih9957T01NTdq/fz8/xdDFF198oRdffNFz66S6ulr/9V//pYsvvljTp0/XypUrdfDgQXV0dOjAgQP64IMPPOd+8sknqqio0IkTJ7Rq1SpdfPHFZ/zqR6errrpKaWlp2rFjh6RvAmPDhg36/PPP1dLSopUrV+qaa67xfACPGzdOH3/8sV577bUz+vaLic/DDRs26Ouvv5bb7db777+vrVu3+lwh6Y3TegXkq6++0uuvv67+/fvrmmuu8WxfsWKF8vLyNGvWLN1yyy1yu9264YYbdP3110v65kcpKysrVV1drVdffdVzXufv+3j22WfVr18/r9/1cP/996uwsNChd+YMXw/W5ubmaubMmbrpppuUkJCgf/zHf1S/fv1CMLrw0tu5mjx5sn7729/qlltucWqoYWfy5MnauXOnpkyZomHDhmnSpEn685//HOphhYXExER98skn+s1vfiOXy6WUlBRNmDBB8+bNU1RUlNrb2/WTn/xER48eVWZmptefo4KCAm3YsEGLFi3S3/3d3+kXv/hFCN+J8+bPn69/+qd/kvRNkMybN08lJSVyuVy66qqrdM8993iOTU5O1qhRo1RRUaFly5aFashGmfo8LC8v19NPP60TJ04oMzNTJSUlGjt2bFDGHNXRdW0dQFAdOXJE06dP11tvveV5hiZSTJgwQc8995yGDRsW6qGccUpLS1VfX6/FixeHeihAr532t2CAcNXR0aHf/e53mjBhQsTFx/vvv6+Ojg4NHjw41EMBEKZO61swQDi77rrrlJSUpKeffjrUQ3HUv/7rv2rXrl26//771b9//1APB0CY4hYMAABwHLdgAACA4wgQAADgOAIEAAA4jgABAACOI0AAAIDjCBAAQfH+++9r5MiRGjlypA4cOBDq4QAIcwQIANuWLFmikSNH6tZbb/VsS05O1iWXXKJLLrnkjPwPOAIILn4RGYCguPDCC7Vu3bpQDwPAaYJfRAbAlmnTpumrr77qtv3ZZ5/VbbfdJkl64403dO6552rJkiV68803NXjwYBUXF+tXv/qVmpqaNH36dN1xxx165pln9MYbbyg5OVlFRUWaNWuW53oNDQ1auXKldu7cqaNHjyojI0PTpk3TvHnzvP5LnwBOT/wtBmDLBRdcoJaWFh09elRJSUnKzs6WJFVWVvo95+DBg3r00UeVnp4ul8ull156Sbt27VJ9fb2Sk5NVV1enf/u3f9MVV1yh7OxsHT16VPPmzVNdXZ3nNfbu3atnn31WX375pR588EGn3i4AQ3gGBIAtjz/+uPLy8iR9EyPr1q3TunXrdOGFF/o958SJE3r66ae1fv16ZWRkSJJqamr00ksv6ZVXXlH//v3ldrv1wQcfSJJ+//vfq66uTmlpaXr99df10ksvef4z6m+++aZqamoMv0sAprECAsC4gQMH6rLLLpMkZWZmqq6uTsOHD9e5554rSUpNTVVtba0OHz4sSfqf//kfSdKhQ4d07bXXel2ro6NDn332mbKyspx7AwCCjgABYFxSUpLn65iYmG7boqKiJH0TF6ee13mLp6v4+HgTwwTgIAIEgG2dAdDa2mrk+t/5znf03nvvKSYmRkuXLvWslLhcLm3fvl3jx4838roAnEOAALBt2LBhkqS//OUvuvHGG5WQkKD58+cH7fpz5szRxo0bVV9frx/+8IfKzs6Wy+VSXV2dTp48qalTpwbttQCEBg+hArBt+vTpKigoUHJysqqqqvTZZ5/J7XYH7fqpqalau3atpk2bppSUFFVVVen48eO6/PLLdffddwftdQCEDr8HBAAAOI4VEAAA4DgCBAAAOI4AAQAAjiNAAACA4wgQAADgOAIEAAA4jgABAACOI0AAAIDjCBAAAOA4AgQAADiOAAEAAI77//i0EgiGzBeiAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ats.plot();" ] }, { "cell_type": "markdown", "id": "5d09589f-fe40-4c7b-953c-7f507933e03c", "metadata": {}, "source": [ "## Activate a logger when anomalies are detected" ] }, { "cell_type": "markdown", "id": "73316597-fe16-43ac-bd11-86ff0af88d2e", "metadata": {}, "source": [ "Upon request, a logger can be activated and produces a dataframe where detected anomalies are recorded. As an example, let's take the last detection code and add a logger to a new quantile detection." ] }, { "cell_type": "code", "execution_count": 26, "id": "349e0ede-794b-42c9-af57-e8c9d809aad5", "metadata": {}, "outputs": [], "source": [ "td = on.detectors.quantile(low_quantile=0.1, enable_logging=True)\n", "td.fit(ts)" ] }, { "cell_type": "markdown", "id": "a63067db-74e8-4998-8c48-634f1622b3f6", "metadata": {}, "source": [ "Detect" ] }, { "cell_type": "code", "execution_count": 27, "id": "e00da952-230e-40a1-a547-20b8c31b0d7f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['time', '0'], dtype='object', name='component')\n" ] } ], "source": [ "ats = td.detect(ts)" ] }, { "cell_type": "markdown", "id": "beb1509a-e131-4899-ae06-7f41689898d6", "metadata": {}, "source": [ "Check what is in the logger" ] }, { "cell_type": "code", "execution_count": 28, "id": "6b13aa0c-4987-49b5-a2f0-da050c2dab7d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
TimestampDescriptionValue
02022-01-01QuantileDetectorTrue
12022-01-02QuantileDetectorFalse
22022-01-03QuantileDetectorFalse
32022-01-04QuantileDetectorFalse
42022-01-05QuantileDetectorFalse
............
3602022-12-27QuantileDetectorFalse
3612022-12-28QuantileDetectorFalse
3622022-12-29QuantileDetectorFalse
3632022-12-30QuantileDetectorFalse
3642022-12-31QuantileDetectorFalse
\n", "

365 rows × 3 columns

\n", "
" ], "text/plain": [ " Timestamp Description Value\n", "0 2022-01-01 QuantileDetector True\n", "1 2022-01-02 QuantileDetector False\n", "2 2022-01-03 QuantileDetector False\n", "3 2022-01-04 QuantileDetector False\n", "4 2022-01-05 QuantileDetector False\n", ".. ... ... ...\n", "360 2022-12-27 QuantileDetector False\n", "361 2022-12-28 QuantileDetector False\n", "362 2022-12-29 QuantileDetector False\n", "363 2022-12-30 QuantileDetector False\n", "364 2022-12-31 QuantileDetector False\n", "\n", "[365 rows x 3 columns]" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "td.logger.log" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.10" }, "papermill": { "default_parameters": {}, "duration": 4.80556, "end_time": "2024-01-31T17:50:30.903022", "environment_variables": {}, "exception": null, "input_path": "docs/user_guide/0_core/0.2-detectors-generators.ipynb", "output_path": "docs/user_guide/0_core/0.2-detectors-generators.ipynb", "parameters": {}, "start_time": "2024-01-31T17:50:26.097462", "version": "2.5.0" } }, "nbformat": 4, "nbformat_minor": 5 }