{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "70a32352-80c9-40b7-8f68-1aeecfc52658", "metadata": { "ExecuteTime": { "end_time": "2024-04-27T10:05:25.636065Z", "start_time": "2024-04-27T10:05:25.632244Z" }, "papermill": { "duration": 0.023706, "end_time": "2024-01-31T17:49:07.385771", "exception": false, "start_time": "2024-01-31T17:49:07.362065", "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": 2, "id": "f8a26d78-229f-47f7-9f66-d0c245dbc096", "metadata": { "ExecuteTime": { "end_time": "2024-04-27T10:05:29.654652Z", "start_time": "2024-04-27T10:05:25.635956Z" }, "papermill": { "duration": 2.47651, "end_time": "2024-01-31T17:49:09.867453", "exception": false, "start_time": "2024-01-31T17:49:07.390943", "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 ontime as on\n", "import pandas as pd" ] }, { "cell_type": "markdown", "id": "9f94ac2b-bc8a-4757-affb-6e570a024804", "metadata": { "papermill": { "duration": 0.002608, "end_time": "2024-01-31T17:49:09.878216", "exception": false, "start_time": "2024-01-31T17:49:09.875608", "status": "completed" }, "tags": [] }, "source": [ "# Getting Started\n", "\n", "The library is divided in three parts : \n", "\n", "1. `core` for all basic features\n", "2. `module` for all features using core features. E.g. benchmarking, ml preprocessing, etc.\n", "3. `context` for all features related to the usage of onTime in an applied scenario" ] }, { "cell_type": "markdown", "id": "c0271c7d-d9b4-414e-b7be-83adeafcc741", "metadata": { "papermill": { "duration": 0.002602, "end_time": "2024-01-31T17:49:09.893863", "exception": false, "start_time": "2024-01-31T17:49:09.891261", "status": "completed" }, "tags": [] }, "source": [ "## `core` Features\n", "\n", "This is a low level API. Most objects and functions are accessible in the base object : \n", " \n", " ontime\n", " ├── detectors\n", " ├── generators\n", " ├── Model\n", " ├── plots\n", " ├── processors\n", " └── TimeSeries\n", "\n", "For instance : " ] }, { "cell_type": "code", "execution_count": 3, "id": "bcbdae2b-2833-43d6-9bf7-16caef87cf75", "metadata": { "ExecuteTime": { "end_time": "2024-04-27T10:05:29.670567Z", "start_time": "2024-04-27T10:05:29.659699Z" }, "papermill": { "duration": 0.012602, "end_time": "2024-01-31T17:49:09.909081", "exception": false, "start_time": "2024-01-31T17:49:09.896479", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
<TimeSeries (DataArray) (time: 5, component: 1, sample: 1)>\n", "array([[[-1.37205979]],\n", "\n", " [[-0.65182852]],\n", "\n", " [[ 0.29932213]],\n", "\n", " [[-0.94618418]],\n", "\n", " [[-0.67047005]]])\n", "Coordinates:\n", " * time (time) datetime64[ns] 2023-01-01 2023-01-02 ... 2023-01-05\n", " * component (component) object 'random_walk'\n", "Dimensions without coordinates: sample\n", "Attributes:\n", " static_covariates: None\n", " hierarchy: None