Skip to content

Instantly share code, notes, and snippets.

@ngupta23
Last active October 25, 2021 15:05
Show Gist options
  • Save ngupta23/038b4c363ee846e9cc6ec4229aafaac5 to your computer and use it in GitHub Desktop.
Save ngupta23/038b4c363ee846e9cc6ec4229aafaac5 to your computer and use it in GitHub Desktop.
pycaret_ts_naas.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "pycaret_ts_naas.ipynb",
"provenance": [],
"collapsed_sections": [],
"toc_visible": true,
"authorship_tag": "ABX9TyO/f1Ka5j2BBOgXVWKlK4Vy",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"c05e38458d1f4f2baa6051214b575303": {
"model_module": "@jupyter-widgets/controls",
"model_name": "IntProgressModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_53aee6449f464210a9fe523f75a819e2",
"_dom_classes": [],
"description": "Processing: ",
"_model_name": "IntProgressModel",
"bar_style": "",
"max": 3,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_a9428e6de6a84f8a97b9389c0c1d8ffa"
}
},
"53aee6449f464210a9fe523f75a819e2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"a9428e6de6a84f8a97b9389c0c1d8ffa": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"632eee0d9d4d4fa580fa02780859ee36": {
"model_module": "@jupyter-widgets/controls",
"model_name": "IntProgressModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_46e8878890a645dc807cab862c219487",
"_dom_classes": [],
"description": "Processing: ",
"_model_name": "IntProgressModel",
"bar_style": "",
"max": 134,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 129,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_ccabc07e1463452ebf8b61b895f3fa70"
}
},
"46e8878890a645dc807cab862c219487": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"ccabc07e1463452ebf8b61b895f3fa70": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"910531b03eb540b88d0f6b3f9063c8b2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "IntProgressModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_dad1f9221c7e4c5b883e137946cad55f",
"_dom_classes": [],
"description": "Processing: ",
"_model_name": "IntProgressModel",
"bar_style": "",
"max": 7,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 7,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_a70cb8b8e5994423ae2e3e0b2d26fe13"
}
},
"dad1f9221c7e4c5b883e137946cad55f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"a70cb8b8e5994423ae2e3e0b2d26fe13": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"122ff6d1166c4689ad1b6c5b541e3f3e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "IntProgressModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_bbf32dfcaed94d50b3f098879bd47be3",
"_dom_classes": [],
"description": "Processing: ",
"_model_name": "IntProgressModel",
"bar_style": "",
"max": 7,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 7,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_40014eb81f1848ef862451fea3c1ec51"
}
},
"bbf32dfcaed94d50b3f098879bd47be3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"40014eb81f1848ef862451fea3c1ec51": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"7d55fec87ad243f88ba284179276d272": {
"model_module": "@jupyter-widgets/controls",
"model_name": "IntProgressModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_d12ad8882d7a4d57b72f10bbd6bbda86",
"_dom_classes": [],
"description": "Processing: ",
"_model_name": "IntProgressModel",
"bar_style": "",
"max": 7,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 7,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_99077c9dfe9247ee9a3428d8d6bc6496"
}
},
"d12ad8882d7a4d57b72f10bbd6bbda86": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"99077c9dfe9247ee9a3428d8d6bc6496": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
},
"f9bcf8729406451b97de9ff69a47de7f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "IntProgressModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_066144d168ae40468365a5673caa9748",
"_dom_classes": [],
"description": "Processing: ",
"_model_name": "IntProgressModel",
"bar_style": "",
"max": 6,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 6,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_405baf5eb2fd4eba9d8513ca33492693"
}
},
"066144d168ae40468365a5673caa9748": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"state": {
"_view_name": "StyleView",
"_model_name": "ProgressStyleModel",
"description_width": "",
"_view_module": "@jupyter-widgets/base",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.2.0",
"bar_color": null,
"_model_module": "@jupyter-widgets/controls"
}
},
"405baf5eb2fd4eba9d8513ca33492693": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"state": {
"_view_name": "LayoutView",
"grid_template_rows": null,
"right": null,
"justify_content": null,
"_view_module": "@jupyter-widgets/base",
"overflow": null,
"_model_module_version": "1.2.0",
"_view_count": null,
"flex_flow": null,
"width": null,
"min_width": null,
"border": null,
"align_items": null,
"bottom": null,
"_model_module": "@jupyter-widgets/base",
"top": null,
"grid_column": null,
"overflow_y": null,
"overflow_x": null,
"grid_auto_flow": null,
"grid_area": null,
"grid_template_columns": null,
"flex": null,
"_model_name": "LayoutModel",
"justify_items": null,
"grid_row": null,
"max_height": null,
"align_content": null,
"visibility": null,
"align_self": null,
"height": null,
"min_height": null,
"padding": null,
"grid_auto_rows": null,
"grid_gap": null,
"max_width": null,
"order": null,
"_view_module_version": "1.2.0",
"grid_template_areas": null,
"object_position": null,
"object_fit": null,
"grid_auto_columns": null,
"margin": null,
"display": null,
"left": null
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/ngupta23/038b4c363ee846e9cc6ec4229aafaac5/pycaret_ts_naas.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "kc9X13Tv7kvW"
},
"source": [
"## Step 0: Install library (one time)"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "0a2Ev2hF4V8u",
"outputId": "c6b2831b-1622-4d90-fa0b-22641c0b6943"
},
"source": [
"!pip install pycaret-ts-alpha -U"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Collecting pycaret-ts-alpha\n",
" Downloading pycaret_ts_alpha-3.0.0.dev1634867798-py3-none-any.whl (475 kB)\n",
"\u001b[K |████████████████████████████████| 475 kB 5.2 MB/s \n",
"\u001b[?25hRequirement already satisfied: cufflinks>=0.17.0 in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (0.17.3)\n",
"Collecting plotly>=5.0.0\n",
" Downloading plotly-5.3.1-py2.py3-none-any.whl (23.9 MB)\n",
"\u001b[K |████████████████████████████████| 23.9 MB 13 kB/s \n",
"\u001b[?25hRequirement already satisfied: spacy<2.4.0 in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (2.2.4)\n",
"Requirement already satisfied: IPython in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (5.5.0)\n",
"Collecting scikit-learn~=0.24.2\n",
" Downloading scikit_learn-0.24.2-cp37-cp37m-manylinux2010_x86_64.whl (22.3 MB)\n",
"\u001b[K |████████████████████████████████| 22.3 MB 1.4 MB/s \n",
"\u001b[?25hRequirement already satisfied: numba in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (0.51.2)\n",
"Collecting yellowbrick>=1.0.1\n",
" Downloading yellowbrick-1.3.post1-py3-none-any.whl (271 kB)\n",
"\u001b[K |████████████████████████████████| 271 kB 59.4 MB/s \n",
"\u001b[?25hRequirement already satisfied: textblob in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (0.15.3)\n",
"Collecting lightgbm>=2.3.1\n",
" Downloading lightgbm-3.3.0-py3-none-manylinux1_x86_64.whl (2.0 MB)\n",
"\u001b[K |████████████████████████████████| 2.0 MB 53.3 MB/s \n",
"\u001b[?25hRequirement already satisfied: numpy==1.19.5 in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (1.19.5)\n",
"Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (3.2.2)\n",
"Requirement already satisfied: seaborn in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (0.11.2)\n",
"Requirement already satisfied: wordcloud in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (1.5.0)\n",
"Requirement already satisfied: ipywidgets in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (7.6.5)\n",
"Requirement already satisfied: scipy<=1.5.4 in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (1.4.1)\n",
"Collecting mlflow\n",
" Downloading mlflow-1.20.2-py3-none-any.whl (14.6 MB)\n",
"\u001b[K |████████████████████████████████| 14.6 MB 124 kB/s \n",
"\u001b[?25hRequirement already satisfied: gensim<4.0.0 in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (3.6.0)\n",
"Collecting tbats>=1.1.0\n",
" Downloading tbats-1.1.0-py3-none-any.whl (43 kB)\n",
"\u001b[K |████████████████████████████████| 43 kB 2.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (1.0.1)\n",
"Collecting scikit-plot\n",
" Downloading scikit_plot-0.3.7-py3-none-any.whl (33 kB)\n",
"Collecting pyLDAvis\n",
" Downloading pyLDAvis-3.3.1.tar.gz (1.7 MB)\n",
"\u001b[K |████████████████████████████████| 1.7 MB 60.8 MB/s \n",
"\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Preparing wheel metadata ... \u001b[?25l\u001b[?25hdone\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (1.1.5)\n",
"Collecting pandas-profiling>=2.8.0\n",
" Downloading pandas_profiling-3.1.0-py2.py3-none-any.whl (261 kB)\n",
"\u001b[K |████████████████████████████████| 261 kB 65.9 MB/s \n",
"\u001b[?25hRequirement already satisfied: pyyaml<6.0.0 in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (3.13)\n",
"Collecting statsmodels~=0.12.1\n",
" Downloading statsmodels-0.12.2-cp37-cp37m-manylinux1_x86_64.whl (9.5 MB)\n",
"\u001b[K |████████████████████████████████| 9.5 MB 36.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: nltk in /usr/local/lib/python3.7/dist-packages (from pycaret-ts-alpha) (3.2.5)\n",
"Collecting sktime>=0.8.0\n",
" Downloading sktime-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB)\n",
"\u001b[K |████████████████████████████████| 5.9 MB 13.9 MB/s \n",
"\u001b[?25hCollecting Boruta\n",
" Downloading Boruta-0.3-py3-none-any.whl (56 kB)\n",
"\u001b[K |████████████████████████████████| 56 kB 4.8 MB/s \n",
"\u001b[?25hCollecting kmodes>=0.10.1\n",
" Downloading kmodes-0.11.1-py2.py3-none-any.whl (19 kB)\n",
"Collecting pyod\n",
" Downloading pyod-0.9.4.tar.gz (111 kB)\n",
"\u001b[K |████████████████████████████████| 111 kB 62.1 MB/s \n",
"\u001b[?25hCollecting pmdarima>=1.8.0\n",
" Downloading pmdarima-1.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.4 MB)\n",
"\u001b[K |████████████████████████████████| 1.4 MB 23.7 MB/s \n",
"\u001b[?25hCollecting mlxtend>=0.17.0\n",
" Downloading mlxtend-0.19.0-py2.py3-none-any.whl (1.3 MB)\n",
"\u001b[K |████████████████████████████████| 1.3 MB 28.1 MB/s \n",
"\u001b[?25hCollecting umap-learn\n",
" Downloading umap-learn-0.5.1.tar.gz (80 kB)\n",
"\u001b[K |████████████████████████████████| 80 kB 9.3 MB/s \n",
"\u001b[?25hCollecting imbalanced-learn==0.7.0\n",
" Downloading imbalanced_learn-0.7.0-py3-none-any.whl (167 kB)\n",
"\u001b[K |████████████████████████████████| 167 kB 58.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.7/dist-packages (from cufflinks>=0.17.0->pycaret-ts-alpha) (1.15.0)\n",
"Requirement already satisfied: setuptools>=34.4.1 in /usr/local/lib/python3.7/dist-packages (from cufflinks>=0.17.0->pycaret-ts-alpha) (57.4.0)\n",
"Requirement already satisfied: colorlover>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from cufflinks>=0.17.0->pycaret-ts-alpha) (0.3.0)\n",
"Requirement already satisfied: smart-open>=1.2.1 in /usr/local/lib/python3.7/dist-packages (from gensim<4.0.0->pycaret-ts-alpha) (5.2.1)\n",
"Requirement already satisfied: pexpect in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (4.8.0)\n",
"Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (2.6.1)\n",
"Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (0.7.5)\n",
"Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (0.8.1)\n",
"Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (4.4.2)\n",
"Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (1.0.18)\n",
"Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.7/dist-packages (from IPython->pycaret-ts-alpha) (5.1.0)\n",
"Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->pycaret-ts-alpha) (4.10.1)\n",
"Requirement already satisfied: ipython-genutils~=0.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->pycaret-ts-alpha) (0.2.0)\n",
"Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->pycaret-ts-alpha) (5.1.3)\n",
"Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->pycaret-ts-alpha) (1.0.2)\n",
"Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->pycaret-ts-alpha) (3.5.1)\n",
"Requirement already satisfied: jupyter-client in /usr/local/lib/python3.7/dist-packages (from ipykernel>=4.5.1->ipywidgets->pycaret-ts-alpha) (5.3.5)\n",
"Requirement already satisfied: tornado>=4.0 in /usr/local/lib/python3.7/dist-packages (from ipykernel>=4.5.1->ipywidgets->pycaret-ts-alpha) (5.1.1)\n",
"Requirement already satisfied: wheel in /usr/local/lib/python3.7/dist-packages (from lightgbm>=2.3.1->pycaret-ts-alpha) (0.37.0)\n",
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->pycaret-ts-alpha) (2.4.7)\n",
"Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->pycaret-ts-alpha) (2.8.2)\n",
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->pycaret-ts-alpha) (0.10.0)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->pycaret-ts-alpha) (1.3.2)\n",
"Requirement already satisfied: jupyter-core in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets->pycaret-ts-alpha) (4.8.1)\n",
"Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets->pycaret-ts-alpha) (2.6.0)\n",
"Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->pycaret-ts-alpha) (2018.9)\n",
"Collecting requests>=2.24.0\n",
" Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)\n",
"\u001b[K |████████████████████████████████| 62 kB 779 kB/s \n",
"\u001b[?25hCollecting visions[type_image_path]==0.7.4\n",
" Downloading visions-0.7.4-py3-none-any.whl (102 kB)\n",
"\u001b[K |████████████████████████████████| 102 kB 10.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: jinja2>=2.11.1 in /usr/local/lib/python3.7/dist-packages (from pandas-profiling>=2.8.0->pycaret-ts-alpha) (2.11.3)\n",
"Requirement already satisfied: tqdm>=4.48.2 in /usr/local/lib/python3.7/dist-packages (from pandas-profiling>=2.8.0->pycaret-ts-alpha) (4.62.3)\n",
"Collecting phik>=0.11.1\n",
" Downloading phik-0.12.0-cp37-cp37m-manylinux2010_x86_64.whl (675 kB)\n",
"\u001b[K |████████████████████████████████| 675 kB 70.5 MB/s \n",
"\u001b[?25hCollecting multimethod>=1.4\n",
" Downloading multimethod-1.6-py3-none-any.whl (9.4 kB)\n",
"Collecting htmlmin>=0.1.12\n",
" Downloading htmlmin-0.1.12.tar.gz (19 kB)\n",
"Collecting pyyaml<6.0.0\n",
" Downloading PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl (636 kB)\n",
"\u001b[K |████████████████████████████████| 636 kB 44.2 MB/s \n",
"\u001b[?25hCollecting tangled-up-in-unicode==0.1.0\n",
" Downloading tangled_up_in_unicode-0.1.0-py3-none-any.whl (3.1 MB)\n",
"\u001b[K |████████████████████████████████| 3.1 MB 16.7 MB/s \n",
"\u001b[?25hRequirement already satisfied: markupsafe~=2.0.1 in /usr/local/lib/python3.7/dist-packages (from pandas-profiling>=2.8.0->pycaret-ts-alpha) (2.0.1)\n",
"Collecting pydantic>=1.8.1\n",
" Downloading pydantic-1.8.2-cp37-cp37m-manylinux2014_x86_64.whl (10.1 MB)\n",
"\u001b[K |████████████████████████████████| 10.1 MB 13.2 MB/s \n",
"\u001b[?25hRequirement already satisfied: missingno>=0.4.2 in /usr/local/lib/python3.7/dist-packages (from pandas-profiling>=2.8.0->pycaret-ts-alpha) (0.5.0)\n",
"Requirement already satisfied: attrs>=19.3.0 in /usr/local/lib/python3.7/dist-packages (from visions[type_image_path]==0.7.4->pandas-profiling>=2.8.0->pycaret-ts-alpha) (21.2.0)\n",
"Requirement already satisfied: networkx>=2.4 in /usr/local/lib/python3.7/dist-packages (from visions[type_image_path]==0.7.4->pandas-profiling>=2.8.0->pycaret-ts-alpha) (2.6.3)\n",
"Collecting imagehash\n",
" Downloading ImageHash-4.2.1.tar.gz (812 kB)\n",
"\u001b[K |████████████████████████████████| 812 kB 53.1 MB/s \n",
"\u001b[?25hRequirement already satisfied: Pillow in /usr/local/lib/python3.7/dist-packages (from visions[type_image_path]==0.7.4->pandas-profiling>=2.8.0->pycaret-ts-alpha) (7.1.2)\n",
"Collecting scipy<=1.5.4\n",
" Downloading scipy-1.5.4-cp37-cp37m-manylinux1_x86_64.whl (25.9 MB)\n",
"\u001b[K |████████████████████████████████| 25.9 MB 1.0 kB/s \n",
"\u001b[?25hCollecting tenacity>=6.2.0\n",
" Downloading tenacity-8.0.1-py3-none-any.whl (24 kB)\n",
"Requirement already satisfied: Cython!=0.29.18,>=0.29 in /usr/local/lib/python3.7/dist-packages (from pmdarima>=1.8.0->pycaret-ts-alpha) (0.29.24)\n",
"Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/dist-packages (from pmdarima>=1.8.0->pycaret-ts-alpha) (1.24.3)\n",
"Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->IPython->pycaret-ts-alpha) (0.2.5)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from pydantic>=1.8.1->pandas-profiling>=2.8.0->pycaret-ts-alpha) (3.7.4.3)\n",
"Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.7/dist-packages (from requests>=2.24.0->pandas-profiling>=2.8.0->pycaret-ts-alpha) (2.0.6)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.24.0->pandas-profiling>=2.8.0->pycaret-ts-alpha) (2021.5.30)\n",
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.24.0->pandas-profiling>=2.8.0->pycaret-ts-alpha) (2.10)\n",
"Collecting threadpoolctl>=2.0.0\n",
" Downloading threadpoolctl-3.0.0-py3-none-any.whl (14 kB)\n",
"Collecting numba\n",
" Downloading numba-0.54.1-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.3 MB)\n",
"\u001b[K |████████████████████████████████| 3.3 MB 68.5 MB/s \n",
"\u001b[?25hCollecting llvmlite<0.38,>=0.37.0rc1\n",
" Downloading llvmlite-0.37.0-cp37-cp37m-manylinux2014_x86_64.whl (26.3 MB)\n",
"\u001b[K |████████████████████████████████| 26.3 MB 93 kB/s \n",
"\u001b[?25hRequirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (2.0.5)\n",
"Requirement already satisfied: plac<1.2.0,>=0.9.6 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (1.1.3)\n",
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (3.0.5)\n",
"Requirement already satisfied: blis<0.5.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (0.4.1)\n",
"Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (1.0.0)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (1.0.5)\n",
"Requirement already satisfied: thinc==7.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (7.4.0)\n",
"Requirement already satisfied: srsly<1.1.0,>=1.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (1.0.5)\n",
"Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<2.4.0->pycaret-ts-alpha) (0.8.2)\n",
"Requirement already satisfied: importlib-metadata>=0.20 in /usr/local/lib/python3.7/dist-packages (from catalogue<1.1.0,>=0.0.7->spacy<2.4.0->pycaret-ts-alpha) (4.8.1)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20->catalogue<1.1.0,>=0.0.7->spacy<2.4.0->pycaret-ts-alpha) (3.6.0)\n",
"Requirement already satisfied: patsy>=0.5 in /usr/local/lib/python3.7/dist-packages (from statsmodels~=0.12.1->pycaret-ts-alpha) (0.5.2)\n",
"Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.7/dist-packages (from widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (5.3.1)\n",
"Requirement already satisfied: Send2Trash in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (1.8.0)\n",
"Requirement already satisfied: nbconvert in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (5.6.1)\n",
"Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (0.12.1)\n",
"Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets->pycaret-ts-alpha) (22.3.0)\n",
"Requirement already satisfied: ptyprocess in /usr/local/lib/python3.7/dist-packages (from terminado>=0.8.1->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (0.7.0)\n",
"Requirement already satisfied: PyWavelets in /usr/local/lib/python3.7/dist-packages (from imagehash->visions[type_image_path]==0.7.4->pandas-profiling>=2.8.0->pycaret-ts-alpha) (1.1.1)\n",
"Collecting gunicorn\n",
" Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)\n",
"\u001b[K |████████████████████████████████| 79 kB 8.1 MB/s \n",
"\u001b[?25hCollecting databricks-cli>=0.8.7\n",
" Downloading databricks-cli-0.16.2.tar.gz (58 kB)\n",
"\u001b[K |████████████████████████████████| 58 kB 5.8 MB/s \n",
"\u001b[?25hCollecting alembic<=1.4.1\n",
" Downloading alembic-1.4.1.tar.gz (1.1 MB)\n",
"\u001b[K |████████████████████████████████| 1.1 MB 47.7 MB/s \n",
"\u001b[?25hRequirement already satisfied: entrypoints in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (0.3)\n",
"Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (7.1.2)\n",
"Collecting gitpython>=2.1.0\n",
" Downloading GitPython-3.1.24-py3-none-any.whl (180 kB)\n",
"\u001b[K |████████████████████████████████| 180 kB 65.0 MB/s \n",
"\u001b[?25hRequirement already satisfied: Flask in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (1.1.4)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (21.0)\n",
"Requirement already satisfied: protobuf>=3.7.0 in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (3.17.3)\n",
"Requirement already satisfied: sqlalchemy in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (1.4.25)\n",
"Collecting prometheus-flask-exporter\n",
" Downloading prometheus_flask_exporter-0.18.4-py3-none-any.whl (17 kB)\n",
"Requirement already satisfied: sqlparse>=0.3.1 in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (0.4.2)\n",
"Collecting querystring-parser\n",
" Downloading querystring_parser-1.2.4-py2.py3-none-any.whl (7.9 kB)\n",
"Requirement already satisfied: cloudpickle in /usr/local/lib/python3.7/dist-packages (from mlflow->pycaret-ts-alpha) (1.3.0)\n",
"Collecting docker>=4.0.0\n",
" Downloading docker-5.0.3-py2.py3-none-any.whl (146 kB)\n",
"\u001b[K |████████████████████████████████| 146 kB 62.2 MB/s \n",
"\u001b[?25hCollecting Mako\n",
" Downloading Mako-1.1.5-py2.py3-none-any.whl (75 kB)\n",
"\u001b[K |████████████████████████████████| 75 kB 4.8 MB/s \n",
"\u001b[?25hCollecting python-editor>=0.3\n",
" Downloading python_editor-1.0.4-py3-none-any.whl (4.9 kB)\n",
"Requirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.7/dist-packages (from databricks-cli>=0.8.7->mlflow->pycaret-ts-alpha) (0.8.9)\n",
"Collecting websocket-client>=0.32.0\n",
" Downloading websocket_client-1.2.1-py2.py3-none-any.whl (52 kB)\n",
"\u001b[K |████████████████████████████████| 52 kB 1.5 MB/s \n",
"\u001b[?25hCollecting gitdb<5,>=4.0.1\n",
" Downloading gitdb-4.0.9-py3-none-any.whl (63 kB)\n",
"\u001b[K |████████████████████████████████| 63 kB 1.7 MB/s \n",
"\u001b[?25hCollecting smmap<6,>=3.0.1\n",
" Downloading smmap-5.0.0-py3-none-any.whl (24 kB)\n",
"Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.7/dist-packages (from sqlalchemy->mlflow->pycaret-ts-alpha) (1.1.2)\n",
"Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.7/dist-packages (from Flask->mlflow->pycaret-ts-alpha) (1.0.1)\n",
"Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.7/dist-packages (from Flask->mlflow->pycaret-ts-alpha) (1.1.0)\n",
"Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (0.5.0)\n",
"Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (4.1.0)\n",
"Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (0.8.4)\n",
"Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (1.5.0)\n",
"Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (0.7.1)\n",
"Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret-ts-alpha) (0.5.1)\n",
"Requirement already satisfied: prometheus-client in /usr/local/lib/python3.7/dist-packages (from prometheus-flask-exporter->mlflow->pycaret-ts-alpha) (0.11.0)\n",
"Requirement already satisfied: sklearn in /usr/local/lib/python3.7/dist-packages (from pyLDAvis->pycaret-ts-alpha) (0.0)\n",
"Collecting pandas\n",
" Downloading pandas-1.3.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.3 MB)\n",
"\u001b[K |████████████████████████████████| 11.3 MB 11.8 MB/s \n",
"\u001b[?25hRequirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from pyLDAvis->pycaret-ts-alpha) (0.16.0)\n",
"Collecting pyLDAvis\n",
" Downloading pyLDAvis-3.3.0.tar.gz (1.7 MB)\n",
"\u001b[K |████████████████████████████████| 1.7 MB 63.0 MB/s \n",
"\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Preparing wheel metadata ... \u001b[?25l\u001b[?25hdone\n",
" Downloading pyLDAvis-3.2.2.tar.gz (1.7 MB)\n",
"\u001b[K |████████████████████████████████| 1.7 MB 51.4 MB/s \n",
"\u001b[?25hRequirement already satisfied: numexpr in /usr/local/lib/python3.7/dist-packages (from pyLDAvis->pycaret-ts-alpha) (2.7.3)\n",
"Collecting funcy\n",
" Downloading funcy-1.16-py2.py3-none-any.whl (32 kB)\n",
"Collecting pynndescent>=0.5\n",
" Downloading pynndescent-0.5.5.tar.gz (1.1 MB)\n",
"\u001b[K |████████████████████████████████| 1.1 MB 46.8 MB/s \n",
"\u001b[?25hBuilding wheels for collected packages: htmlmin, imagehash, alembic, databricks-cli, pyLDAvis, pyod, umap-learn, pynndescent\n",
" Building wheel for htmlmin (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for htmlmin: filename=htmlmin-0.1.12-py3-none-any.whl size=27098 sha256=5ecc771f9d8379f339337cb481d4086b93711441b56df0fe4f8e48263d22a585\n",
" Stored in directory: /root/.cache/pip/wheels/70/e1/52/5b14d250ba868768823940c3229e9950d201a26d0bd3ee8655\n",
" Building wheel for imagehash (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for imagehash: filename=ImageHash-4.2.1-py2.py3-none-any.whl size=295207 sha256=eebc4303a751209b31fd5259fa152bea4176e280790f449c9a0afee5d8f3a0c7\n",
" Stored in directory: /root/.cache/pip/wheels/4c/d5/59/5e3e297533ddb09407769762985d134135064c6831e29a914e\n",
" Building wheel for alembic (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for alembic: filename=alembic-1.4.1-py2.py3-none-any.whl size=158172 sha256=e40ce81e324d2dfa693eb68aca79836da2e3c3b82fd00c8e582abf8cbe12b44f\n",
" Stored in directory: /root/.cache/pip/wheels/be/5d/0a/9e13f53f4f5dfb67cd8d245bb7cdffe12f135846f491a283e3\n",
" Building wheel for databricks-cli (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for databricks-cli: filename=databricks_cli-0.16.2-py3-none-any.whl size=106811 sha256=be50332ec77df805d366c1261a31ed539ad055d57fcb20a515a96014cea297d7\n",
" Stored in directory: /root/.cache/pip/wheels/f4/5c/ed/e1ce20a53095f63b27b4964abbad03e59cf3472822addf7d29\n",
" Building wheel for pyLDAvis (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for pyLDAvis: filename=pyLDAvis-3.2.2-py2.py3-none-any.whl size=135618 sha256=b3c7296ee89918e52c058f964a8f5ca0941e8c700bab86897db42b3771ea3226\n",
" Stored in directory: /root/.cache/pip/wheels/f8/b1/9b/560ac1931796b7303f7b517b949d2d31a4fbc512aad3b9f284\n",
" Building wheel for pyod (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for pyod: filename=pyod-0.9.4-py3-none-any.whl size=130726 sha256=f4b69239414d1a4236e80e6a77a6c568f32113921af724f32305e69b4f70c749\n",
" Stored in directory: /root/.cache/pip/wheels/50/32/84/d64079e8bf087c1b231c9beecfa9abc08592ab5f5f333124cd\n",
" Building wheel for umap-learn (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for umap-learn: filename=umap_learn-0.5.1-py3-none-any.whl size=76564 sha256=790f8729b3a859b1756c266393171abeb059bf18698deebf310d79edb2acd988\n",
" Stored in directory: /root/.cache/pip/wheels/01/e7/bb/347dc0e510803d7116a13d592b10cc68262da56a8eec4dd72f\n",
" Building wheel for pynndescent (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for pynndescent: filename=pynndescent-0.5.5-py3-none-any.whl size=52603 sha256=df5d1fb770132972ac6a3fe5065c9dbf27a31d57809d3f0c9453b51542975cc1\n",
" Stored in directory: /root/.cache/pip/wheels/af/e9/33/04db1436df0757c42fda8ea6796d7a8586e23c85fac355f476\n",
"Successfully built htmlmin imagehash alembic databricks-cli pyLDAvis pyod umap-learn pynndescent\n",
"Installing collected packages: threadpoolctl, tangled-up-in-unicode, smmap, scipy, multimethod, llvmlite, websocket-client, visions, tenacity, statsmodels, scikit-learn, requests, python-editor, numba, Mako, imagehash, gitdb, querystring-parser, pyyaml, pynndescent, pydantic, prometheus-flask-exporter, pmdarima, plotly, phik, htmlmin, gunicorn, gitpython, funcy, docker, databricks-cli, alembic, yellowbrick, umap-learn, tbats, sktime, scikit-plot, pyod, pyLDAvis, pandas-profiling, mlxtend, mlflow, lightgbm, kmodes, imbalanced-learn, Boruta, pycaret-ts-alpha\n",
" Attempting uninstall: scipy\n",
" Found existing installation: scipy 1.4.1\n",
" Uninstalling scipy-1.4.1:\n",
" Successfully uninstalled scipy-1.4.1\n",
" Attempting uninstall: llvmlite\n",
" Found existing installation: llvmlite 0.34.0\n",
" Uninstalling llvmlite-0.34.0:\n",
" Successfully uninstalled llvmlite-0.34.0\n",
" Attempting uninstall: statsmodels\n",
" Found existing installation: statsmodels 0.10.2\n",
" Uninstalling statsmodels-0.10.2:\n",
" Successfully uninstalled statsmodels-0.10.2\n",
" Attempting uninstall: scikit-learn\n",
" Found existing installation: scikit-learn 0.22.2.post1\n",
" Uninstalling scikit-learn-0.22.2.post1:\n",
" Successfully uninstalled scikit-learn-0.22.2.post1\n",
" Attempting uninstall: requests\n",
" Found existing installation: requests 2.23.0\n",
" Uninstalling requests-2.23.0:\n",
" Successfully uninstalled requests-2.23.0\n",
" Attempting uninstall: numba\n",
" Found existing installation: numba 0.51.2\n",
" Uninstalling numba-0.51.2:\n",
" Successfully uninstalled numba-0.51.2\n",
" Attempting uninstall: pyyaml\n",
" Found existing installation: PyYAML 3.13\n",
" Uninstalling PyYAML-3.13:\n",
" Successfully uninstalled PyYAML-3.13\n",
" Attempting uninstall: plotly\n",
" Found existing installation: plotly 4.4.1\n",
" Uninstalling plotly-4.4.1:\n",
" Successfully uninstalled plotly-4.4.1\n",
" Attempting uninstall: yellowbrick\n",
" Found existing installation: yellowbrick 0.9.1\n",
" Uninstalling yellowbrick-0.9.1:\n",
" Successfully uninstalled yellowbrick-0.9.1\n",
" Attempting uninstall: pandas-profiling\n",
" Found existing installation: pandas-profiling 1.4.1\n",
" Uninstalling pandas-profiling-1.4.1:\n",
" Successfully uninstalled pandas-profiling-1.4.1\n",
" Attempting uninstall: mlxtend\n",
" Found existing installation: mlxtend 0.14.0\n",
" Uninstalling mlxtend-0.14.0:\n",
" Successfully uninstalled mlxtend-0.14.0\n",
" Attempting uninstall: lightgbm\n",
" Found existing installation: lightgbm 2.2.3\n",
" Uninstalling lightgbm-2.2.3:\n",
" Successfully uninstalled lightgbm-2.2.3\n",
" Attempting uninstall: imbalanced-learn\n",
" Found existing installation: imbalanced-learn 0.4.3\n",
" Uninstalling imbalanced-learn-0.4.3:\n",
" Successfully uninstalled imbalanced-learn-0.4.3\n",
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"google-colab 1.0.0 requires requests~=2.23.0, but you have requests 2.26.0 which is incompatible.\n",
"datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.\n",
"albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.\u001b[0m\n",
"Successfully installed Boruta-0.3 Mako-1.1.5 alembic-1.4.1 databricks-cli-0.16.2 docker-5.0.3 funcy-1.16 gitdb-4.0.9 gitpython-3.1.24 gunicorn-20.1.0 htmlmin-0.1.12 imagehash-4.2.1 imbalanced-learn-0.7.0 kmodes-0.11.1 lightgbm-3.3.0 llvmlite-0.37.0 mlflow-1.20.2 mlxtend-0.19.0 multimethod-1.6 numba-0.54.1 pandas-profiling-3.1.0 phik-0.12.0 plotly-5.3.1 pmdarima-1.8.3 prometheus-flask-exporter-0.18.4 pyLDAvis-3.2.2 pycaret-ts-alpha-3.0.0.dev1634867798 pydantic-1.8.2 pynndescent-0.5.5 pyod-0.9.4 python-editor-1.0.4 pyyaml-5.4.1 querystring-parser-1.2.4 requests-2.26.0 scikit-learn-0.24.2 scikit-plot-0.3.7 scipy-1.5.4 sktime-0.8.0 smmap-5.0.0 statsmodels-0.12.2 tangled-up-in-unicode-0.1.0 tbats-1.1.0 tenacity-8.0.1 threadpoolctl-3.0.0 umap-learn-0.5.1 visions-0.7.4 websocket-client-1.2.1 yellowbrick-1.3.post1\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "fvsqXdRR7s1V"
},
"source": [
"## Step 1: Load data"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 140
},
"id": "KoE_lgXs4ly4",
"outputId": "76e3dda7-5ecb-4d65-88ca-408a110178c3"
},
"source": [
"from pycaret.datasets import get_data\n",
"y = get_data(\"airline\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Period\n",
"1949-01 112.0\n",
"1949-02 118.0\n",
"1949-03 132.0\n",
"1949-04 129.0\n",
"1949-05 121.0\n",
"Freq: M, Name: Number of airline passengers, dtype: float64"
]
},
"metadata": {}
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "e_CBvHqS7xE1"
},
"source": [
"## Step 2: Setup experiment"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 682,
"referenced_widgets": [
"c05e38458d1f4f2baa6051214b575303",
"53aee6449f464210a9fe523f75a819e2",
"a9428e6de6a84f8a97b9389c0c1d8ffa"
]
},
"id": "CX7l9QjJ4pR9",
"outputId": "9f708797-4a1d-40fc-fdd7-b31f9629e74e"
},
"source": [
"from pycaret.internal.pycaret_experiment.time_series_experiment import TimeSeriesExperiment\n",
"exp = TimeSeriesExperiment()\n",
"\n",
"# NOTE: If your data does not have a datetime or period index,\n",
"# then please specify the seasonal_period parameters in setup.\n",
"exp.setup(data=y, fh=12, session_id=42)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Description</th>\n",
" <th>Value</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>session_id</td>\n",
" <td>42</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Original Data</td>\n",
" <td>(144, 1)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Missing Values</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Transformed Train Set</td>\n",
" <td>(132,)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Transformed Test Set</td>\n",
" <td>(12,)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Fold Generator</td>\n",
" <td>ExpandingWindowSplitter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Fold Number</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>Enforce Prediction Interval</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Seasonal Period Tested</td>\n",
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Seasonality Detected</td>\n",
" <td>True</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>Target Strictly Positive</td>\n",
" <td>True</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>Target White Noise</td>\n",
" <td>No</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>Recommended d</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>Recommended Seasonal D</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>CPU Jobs</td>\n",
" <td>-1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>Use GPU</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>Log Experiment</td>\n",
" <td>False</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>Experiment Name</td>\n",
" <td>ts-default-name</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>USI</td>\n",
" <td>ab91</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>Imputation Type</td>\n",
" <td>simple</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Description Value\n",
"0 session_id 42\n",
"1 Original Data (144, 1)\n",
"2 Missing Values False\n",
"3 Transformed Train Set (132,)\n",
"4 Transformed Test Set (12,)\n",
"5 Fold Generator ExpandingWindowSplitter\n",
"6 Fold Number 3\n",
"7 Enforce Prediction Interval False\n",
"8 Seasonal Period Tested 12\n",
"9 Seasonality Detected True\n",
"10 Target Strictly Positive True\n",
"11 Target White Noise No\n",
"12 Recommended d 1\n",
"13 Recommended Seasonal D 1\n",
"14 CPU Jobs -1\n",
"15 Use GPU False\n",
"16 Log Experiment False\n",
"17 Experiment Name ts-default-name\n",
"18 USI ab91\n",
"19 Imputation Type simple"
]
},
"metadata": {}
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<pycaret.internal.pycaret_experiment.time_series_experiment.TimeSeriesExperiment at 0x7f4669e16590>"
]
},
"metadata": {},
"execution_count": 3
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "e0G28EkL7MMv"
},
"source": [
"## Step 3: Train Forecasters"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 819,
"referenced_widgets": [
"632eee0d9d4d4fa580fa02780859ee36",
"46e8878890a645dc807cab862c219487",
"ccabc07e1463452ebf8b61b895f3fa70"
]
},
"id": "3zKOxFfh4r_y",
"outputId": "b663b831-f4e0-41d3-f6aa-f122590e470e"
},
"source": [
"#### Step 3A: Compare multiple baseline models & return top 3 ----\n",
"baseline_models = exp.compare_models(n_select=3)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Model</th>\n",
" <th>MAE</th>\n",
" <th>RMSE</th>\n",
" <th>MAPE</th>\n",
" <th>SMAPE</th>\n",
" <th>R2</th>\n",
" <th>TT (Sec)</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>exp_smooth</th>\n",
" <td>Exponential Smoothing</td>\n",
" <td>16.7773</td>\n",
" <td>19.7959</td>\n",
" <td>0.0422</td>\n",
" <td>0.0427</td>\n",
" <td>0.8954</td>\n",
" <td>0.1467</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ets</th>\n",
" <td>ETS</td>\n",
" <td>17.4191</td>\n",
" <td>20.5125</td>\n",
" <td>0.044</td>\n",
" <td>0.0445</td>\n",
" <td>0.8882</td>\n",
" <td>0.2167</td>\n",
" </tr>\n",
" <tr>\n",
" <th>arima</th>\n",
" <td>ARIMA</td>\n",
" <td>20.0069</td>\n",
" <td>22.2199</td>\n",
" <td>0.0501</td>\n",
" <td>0.0507</td>\n",
" <td>0.8677</td>\n",
" <td>0.0767</td>\n",
" </tr>\n",
" <tr>\n",
" <th>auto_arima</th>\n",
" <td>Auto ARIMA</td>\n",
" <td>21.0297</td>\n",
" <td>23.4661</td>\n",
" <td>0.0525</td>\n",
" <td>0.0531</td>\n",
" <td>0.8509</td>\n",
" <td>4.4700</td>\n",
" </tr>\n",
" <tr>\n",
" <th>et_cds_dt</th>\n",
" <td>Extra Trees w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>24.4233</td>\n",
" <td>31.4395</td>\n",
" <td>0.0584</td>\n",
" <td>0.0601</td>\n",
" <td>0.7169</td>\n",
" <td>0.9767</td>\n",
" </tr>\n",
" <tr>\n",
" <th>knn_cds_dt</th>\n",
" <td>K Neighbors w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>25.8293</td>\n",
" <td>34.9633</td>\n",
" <td>0.0617</td>\n",
" <td>0.0641</td>\n",
" <td>0.626</td>\n",
" <td>0.8367</td>\n",
" </tr>\n",
" <tr>\n",
" <th>rf_cds_dt</th>\n",
" <td>Random Forest w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>26.8586</td>\n",
" <td>38.0499</td>\n",
" <td>0.0629</td>\n",
" <td>0.0654</td>\n",
" <td>0.6023</td>\n",
" <td>1.0133</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ada_cds_dt</th>\n",
" <td>AdaBoost w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>27.82</td>\n",
" <td>37.791</td>\n",
" <td>0.0661</td>\n",
" <td>0.0686</td>\n",
" <td>0.6015</td>\n",
" <td>0.1233</td>\n",
" </tr>\n",
" <tr>\n",
" <th>theta</th>\n",
" <td>Theta Forecaster</td>\n",
" <td>28.3192</td>\n",
" <td>33.8639</td>\n",
" <td>0.067</td>\n",
" <td>0.07</td>\n",
" <td>0.671</td>\n",
" <td>0.0200</td>\n",
" </tr>\n",
" <tr>\n",
" <th>gbr_cds_dt</th>\n",
" <td>Gradient Boosting w/ Cond. Deseasonalize &amp; Det...</td>\n",
" <td>29.1314</td>\n",
" <td>38.308</td>\n",
" <td>0.0685</td>\n",
" <td>0.0715</td>\n",
" <td>0.5855</td>\n",
" <td>0.0633</td>\n",
" </tr>\n",
" <tr>\n",
" <th>lightgbm_cds_dt</th>\n",
" <td>Light Gradient Boosting w/ Cond. Deseasonalize...</td>\n",
" <td>28.7738</td>\n",
" <td>36.2392</td>\n",
" <td>0.0698</td>\n",
" <td>0.0722</td>\n",
" <td>0.6255</td>\n",
" <td>0.0333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>br_cds_dt</th>\n",
" <td>Bayesian Ridge w/ Cond. Deseasonalize &amp; Detren...</td>\n",
" <td>32.0341</td>\n",
" <td>39.2191</td>\n",
" <td>0.0799</td>\n",
" <td>0.0818</td>\n",
" <td>0.5658</td>\n",
" <td>0.0267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>lasso_cds_dt</th>\n",
" <td>Lasso w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>32.8026</td>\n",
" <td>39.2084</td>\n",
" <td>0.0823</td>\n",
" <td>0.0841</td>\n",
" <td>0.5678</td>\n",
" <td>0.0300</td>\n",
" </tr>\n",
" <tr>\n",
" <th>en_cds_dt</th>\n",
" <td>Elastic Net w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>32.8556</td>\n",
" <td>39.2557</td>\n",
" <td>0.0825</td>\n",
" <td>0.0843</td>\n",
" <td>0.5669</td>\n",
" <td>0.0233</td>\n",
" </tr>\n",
" <tr>\n",
" <th>lr_cds_dt</th>\n",
" <td>Linear w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>32.9708</td>\n",
" <td>39.3456</td>\n",
" <td>0.0828</td>\n",
" <td>0.0846</td>\n",
" <td>0.5652</td>\n",
" <td>0.0233</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ridge_cds_dt</th>\n",
" <td>Ridge w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>32.9702</td>\n",
" <td>39.3452</td>\n",
" <td>0.0828</td>\n",
" <td>0.0846</td>\n",
" <td>0.5652</td>\n",
" <td>0.0233</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dt_cds_dt</th>\n",
" <td>Decision Tree w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>35.1446</td>\n",
" <td>45.8861</td>\n",
" <td>0.0826</td>\n",
" <td>0.0869</td>\n",
" <td>0.4284</td>\n",
" <td>0.0267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>snaive</th>\n",
" <td>Seasonal Naive Forecaster</td>\n",
" <td>33.3611</td>\n",
" <td>35.9139</td>\n",
" <td>0.0832</td>\n",
" <td>0.0879</td>\n",
" <td>0.6072</td>\n",
" <td>0.0167</td>\n",
" </tr>\n",
" <tr>\n",
" <th>huber_cds_dt</th>\n",
" <td>Huber w/ Cond. Deseasonalize &amp; Detrending</td>\n",
" <td>35.4709</td>\n",
" <td>41.1489</td>\n",
" <td>0.091</td>\n",
" <td>0.0936</td>\n",
" <td>0.5226</td>\n",
" <td>0.0433</td>\n",
" </tr>\n",
" <tr>\n",
" <th>lar_cds_dt</th>\n",
" <td>Least Angular Regressor w/ Cond. Deseasonalize...</td>\n",
" <td>36.5285</td>\n",
" <td>42.4001</td>\n",
" <td>0.0936</td>\n",
" <td>0.0945</td>\n",
" <td>0.5058</td>\n",
" <td>0.0267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>llar_cds_dt</th>\n",
" <td>Lasso Least Angular Regressor w/ Cond. Deseaso...</td>\n",
" <td>46.7239</td>\n",
" <td>63.1706</td>\n",
" <td>0.1109</td>\n",
" <td>0.1165</td>\n",
" <td>-0.0733</td>\n",
" <td>0.0267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>omp_cds_dt</th>\n",
" <td>Orthogonal Matching Pursuit w/ Cond. Deseasona...</td>\n",
" <td>47.2799</td>\n",
" <td>64.5891</td>\n",
" <td>0.111</td>\n",
" <td>0.1177</td>\n",
" <td>-0.1201</td>\n",
" <td>0.0267</td>\n",
" </tr>\n",
" <tr>\n",
" <th>polytrend</th>\n",
" <td>Polynomial Trend Forecaster</td>\n",
" <td>48.6301</td>\n",
" <td>63.4299</td>\n",
" <td>0.117</td>\n",
" <td>0.1216</td>\n",
" <td>-0.0784</td>\n",
" <td>0.0133</td>\n",
" </tr>\n",
" <tr>\n",
" <th>naive</th>\n",
" <td>Naive Forecaster</td>\n",
" <td>69.0278</td>\n",
" <td>91.0322</td>\n",
" <td>0.1569</td>\n",
" <td>0.1792</td>\n",
" <td>-1.2216</td>\n",
" <td>1.4567</td>\n",
" </tr>\n",
" <tr>\n",
" <th>par_cds_dt</th>\n",
" <td>Passive Aggressive w/ Cond. Deseasonalize &amp; De...</td>\n",
" <td>78.0396</td>\n",
" <td>95.4251</td>\n",
" <td>0.2137</td>\n",
" <td>0.2531</td>\n",
" <td>-3.0784</td>\n",
" <td>0.0233</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Model MAE \\\n",
"exp_smooth Exponential Smoothing 16.7773 \n",
"ets ETS 17.4191 \n",
"arima ARIMA 20.0069 \n",
"auto_arima Auto ARIMA 21.0297 \n",
"et_cds_dt Extra Trees w/ Cond. Deseasonalize & Detrending 24.4233 \n",
"knn_cds_dt K Neighbors w/ Cond. Deseasonalize & Detrending 25.8293 \n",
"rf_cds_dt Random Forest w/ Cond. Deseasonalize & Detrending 26.8586 \n",
"ada_cds_dt AdaBoost w/ Cond. Deseasonalize & Detrending 27.82 \n",
"theta Theta Forecaster 28.3192 \n",
"gbr_cds_dt Gradient Boosting w/ Cond. Deseasonalize & Det... 29.1314 \n",
"lightgbm_cds_dt Light Gradient Boosting w/ Cond. Deseasonalize... 28.7738 \n",
"br_cds_dt Bayesian Ridge w/ Cond. Deseasonalize & Detren... 32.0341 \n",
"lasso_cds_dt Lasso w/ Cond. Deseasonalize & Detrending 32.8026 \n",
"en_cds_dt Elastic Net w/ Cond. Deseasonalize & Detrending 32.8556 \n",
"lr_cds_dt Linear w/ Cond. Deseasonalize & Detrending 32.9708 \n",
"ridge_cds_dt Ridge w/ Cond. Deseasonalize & Detrending 32.9702 \n",
"dt_cds_dt Decision Tree w/ Cond. Deseasonalize & Detrending 35.1446 \n",
"snaive Seasonal Naive Forecaster 33.3611 \n",
"huber_cds_dt Huber w/ Cond. Deseasonalize & Detrending 35.4709 \n",
"lar_cds_dt Least Angular Regressor w/ Cond. Deseasonalize... 36.5285 \n",
"llar_cds_dt Lasso Least Angular Regressor w/ Cond. Deseaso... 46.7239 \n",
"omp_cds_dt Orthogonal Matching Pursuit w/ Cond. Deseasona... 47.2799 \n",
"polytrend Polynomial Trend Forecaster 48.6301 \n",
"naive Naive Forecaster 69.0278 \n",
"par_cds_dt Passive Aggressive w/ Cond. Deseasonalize & De... 78.0396 \n",
"\n",
" RMSE MAPE SMAPE R2 TT (Sec) \n",
"exp_smooth 19.7959 0.0422 0.0427 0.8954 0.1467 \n",
"ets 20.5125 0.044 0.0445 0.8882 0.2167 \n",
"arima 22.2199 0.0501 0.0507 0.8677 0.0767 \n",
"auto_arima 23.4661 0.0525 0.0531 0.8509 4.4700 \n",
"et_cds_dt 31.4395 0.0584 0.0601 0.7169 0.9767 \n",
"knn_cds_dt 34.9633 0.0617 0.0641 0.626 0.8367 \n",
"rf_cds_dt 38.0499 0.0629 0.0654 0.6023 1.0133 \n",
"ada_cds_dt 37.791 0.0661 0.0686 0.6015 0.1233 \n",
"theta 33.8639 0.067 0.07 0.671 0.0200 \n",
"gbr_cds_dt 38.308 0.0685 0.0715 0.5855 0.0633 \n",
"lightgbm_cds_dt 36.2392 0.0698 0.0722 0.6255 0.0333 \n",
"br_cds_dt 39.2191 0.0799 0.0818 0.5658 0.0267 \n",
"lasso_cds_dt 39.2084 0.0823 0.0841 0.5678 0.0300 \n",
"en_cds_dt 39.2557 0.0825 0.0843 0.5669 0.0233 \n",
"lr_cds_dt 39.3456 0.0828 0.0846 0.5652 0.0233 \n",
"ridge_cds_dt 39.3452 0.0828 0.0846 0.5652 0.0233 \n",
"dt_cds_dt 45.8861 0.0826 0.0869 0.4284 0.0267 \n",
"snaive 35.9139 0.0832 0.0879 0.6072 0.0167 \n",
"huber_cds_dt 41.1489 0.091 0.0936 0.5226 0.0433 \n",
"lar_cds_dt 42.4001 0.0936 0.0945 0.5058 0.0267 \n",
"llar_cds_dt 63.1706 0.1109 0.1165 -0.0733 0.0267 \n",
"omp_cds_dt 64.5891 0.111 0.1177 -0.1201 0.0267 \n",
"polytrend 63.4299 0.117 0.1216 -0.0784 0.0133 \n",
"naive 91.0322 0.1569 0.1792 -1.2216 1.4567 \n",
"par_cds_dt 95.4251 0.2137 0.2531 -3.0784 0.0233 "
]
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 203,
"referenced_widgets": [
"910531b03eb540b88d0f6b3f9063c8b2",
"dad1f9221c7e4c5b883e137946cad55f",
"a70cb8b8e5994423ae2e3e0b2d26fe13",
"122ff6d1166c4689ad1b6c5b541e3f3e",
"bbf32dfcaed94d50b3f098879bd47be3",
"40014eb81f1848ef862451fea3c1ec51",
"7d55fec87ad243f88ba284179276d272",
"d12ad8882d7a4d57b72f10bbd6bbda86",
"99077c9dfe9247ee9a3428d8d6bc6496"
]
},
"id": "3Jt0xcXy5l1h",
"outputId": "eab6bffa-7c0a-49bc-cd1f-baaf0340dd41"
},
"source": [
"#### Step 3B: Perform hyperparameter tuning on the best baseline models ----\n",
"tuned_baseline_models = [exp.tune_model(model) for model in baseline_models]"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cutoff</th>\n",
" <th>MAE</th>\n",
" <th>RMSE</th>\n",
" <th>MAPE</th>\n",
" <th>SMAPE</th>\n",
" <th>R2</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1956-12</td>\n",
" <td>13.2626</td>\n",
" <td>16.6689</td>\n",
" <td>0.0331</td>\n",
" <td>0.0339</td>\n",
" <td>0.9096</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1957-12</td>\n",
" <td>19.1686</td>\n",
" <td>21.3384</td>\n",
" <td>0.0530</td>\n",
" <td>0.0513</td>\n",
" <td>0.8807</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1958-12</td>\n",
" <td>21.1925</td>\n",
" <td>23.4747</td>\n",
" <td>0.0491</td>\n",
" <td>0.0506</td>\n",
" <td>0.8767</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mean</th>\n",
" <td>NaN</td>\n",
" <td>17.8746</td>\n",
" <td>20.4940</td>\n",
" <td>0.0451</td>\n",
" <td>0.0453</td>\n",
" <td>0.8890</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SD</th>\n",
" <td>NaN</td>\n",
" <td>3.3642</td>\n",
" <td>2.8419</td>\n",
" <td>0.0086</td>\n",
" <td>0.0080</td>\n",
" <td>0.0146</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" cutoff MAE RMSE MAPE SMAPE R2\n",
"0 1956-12 13.2626 16.6689 0.0331 0.0339 0.9096\n",
"1 1957-12 19.1686 21.3384 0.0530 0.0513 0.8807\n",
"2 1958-12 21.1925 23.4747 0.0491 0.0506 0.8767\n",
"Mean NaN 17.8746 20.4940 0.0451 0.0453 0.8890\n",
"SD NaN 3.3642 2.8419 0.0086 0.0080 0.0146"
]
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 203,
"referenced_widgets": [
"f9bcf8729406451b97de9ff69a47de7f",
"066144d168ae40468365a5673caa9748",
"405baf5eb2fd4eba9d8513ca33492693"
]
},
"id": "Nb7vzjYB53Rl",
"outputId": "56e5b586-829e-404c-fe9a-bdc4cd81dbeb"
},
"source": [
"#### Step 3C: Blend the tuned models into 1 composite estimator ----\n",
"# If performance of blender is not better than the individual \n",
"# models then choose the best individual model\n",
"blender = exp.blend_models(tuned_baseline_models, method='median', choose_better=True)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cutoff</th>\n",
" <th>MAE</th>\n",
" <th>RMSE</th>\n",
" <th>MAPE</th>\n",
" <th>SMAPE</th>\n",
" <th>R2</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1956-12</td>\n",
" <td>11.0061</td>\n",
" <td>14.5135</td>\n",
" <td>0.0278</td>\n",
" <td>0.0281</td>\n",
" <td>0.9314</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1957-12</td>\n",
" <td>26.4530</td>\n",
" <td>29.9504</td>\n",
" <td>0.0742</td>\n",
" <td>0.0708</td>\n",
" <td>0.7650</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1958-12</td>\n",
" <td>13.7404</td>\n",
" <td>15.9712</td>\n",
" <td>0.0314</td>\n",
" <td>0.0320</td>\n",
" <td>0.9429</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Mean</th>\n",
" <td>NaN</td>\n",
" <td>17.0665</td>\n",
" <td>20.1450</td>\n",
" <td>0.0445</td>\n",
" <td>0.0436</td>\n",
" <td>0.8798</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SD</th>\n",
" <td>NaN</td>\n",
" <td>6.7305</td>\n",
" <td>6.9589</td>\n",
" <td>0.0211</td>\n",
" <td>0.0193</td>\n",
" <td>0.0813</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" cutoff MAE RMSE MAPE SMAPE R2\n",
"0 1956-12 11.0061 14.5135 0.0278 0.0281 0.9314\n",
"1 1957-12 26.4530 29.9504 0.0742 0.0708 0.7650\n",
"2 1958-12 13.7404 15.9712 0.0314 0.0320 0.9429\n",
"Mean NaN 17.0665 20.1450 0.0445 0.0436 0.8798\n",
"SD NaN 6.7305 6.9589 0.0211 0.0193 0.0813"
]
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 542
},
"id": "ySLO8Om26X8L",
"outputId": "acc70bb4-91c8-4da2-ca03-c556d4ae1f7f"
},
"source": [
"#### Step 3D: Check predictions ----\n",
"exp.plot_model(blender)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<html>\n",
"<head><meta charset=\"utf-8\" /></head>\n",
"<body>\n",
" <div> <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script> <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
" <script src=\"https://cdn.plot.ly/plotly-2.4.2.min.js\"></script> <div id=\"118c493b-a695-4729-9766-fae1208eb430\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"118c493b-a695-4729-9766-fae1208eb430\")) { Plotly.newPlot( \"118c493b-a695-4729-9766-fae1208eb430\", [{\"line\":{\"color\":\"#1f77b4\"},\"marker\":{\"size\":5},\"mode\":\"lines+markers\",\"name\":\"Forecast | Exponential Smoothing\",\"showlegend\":true,\"type\":\"scatter\",\"x\":[\"1960-01-01T00:00:00\",\"1960-02-01T00:00:00\",\"1960-03-01T00:00:00\",\"1960-04-01T00:00:00\",\"1960-05-01T00:00:00\",\"1960-06-01T00:00:00\",\"1960-07-01T00:00:00\",\"1960-08-01T00:00:00\",\"1960-09-01T00:00:00\",\"1960-10-01T00:00:00\",\"1960-11-01T00:00:00\",\"1960-12-01T00:00:00\"],\"y\":[421.1026,401.0329,470.9998,460.4431,485.2459,556.8663,638.3335,643.5432,529.12,464.7396,409.7826,445.7128]},{\"marker\":{\"color\":\"#3f3f3f\",\"size\":5},\"mode\":\"lines+markers\",\"name\":\"Original\",\"showlegend\":true,\"type\":\"scatter\",\"x\":[\"1949-01-01T00:00:00\",\"1949-02-01T00:00:00\",\"1949-03-01T00:00:00\",\"1949-04-01T00:00:00\",\"1949-05-01T00:00:00\",\"1949-06-01T00:00:00\",\"1949-07-01T00:00:00\",\"1949-08-01T00:00:00\",\"1949-09-01T00:00:00\",\"1949-10-01T00:00:00\",\"1949-11-01T00:00:00\",\"1949-12-01T00:00:00\",\"1950-01-01T00:00:00\",\"1950-02-01T00:00:00\",\"1950-03-01T00:00:00\",\"1950-04-01T00:00:00\",\"1950-05-01T00:00:00\",\"1950-06-01T00:00:00\",\"1950-07-01T00:00:00\",\"1950-08-01T00:00:00\",\"1950-09-01T00:00:00\",\"1950-10-01T00:00:00\",\"1950-11-01T00:00:00\",\"1950-12-01T00:00:00\",\"1951-01-01T00:00:00\",\"1951-02-01T00:00:00\",\"1951-03-01T00:00:00\",\"1951-04-01T00:00:00\",\"1951-05-01T00:00:00\",\"1951-06-01T00:00:00\",\"1951-07-01T00:00:00\",\"1951-08-01T00:00:00\",\"1951-09-01T00:00:00\",\"1951-10-01T00:00:00\",\"1951-11-01T00:00:00\",\"1951-12-01T00:00:00\",\"1952-01-01T00:00:00\",\"1952-02-01T00:00:00\",\"1952-03-01T00:00:00\",\"1952-04-01T00:00:00\",\"1952-05-01T00:00:00\",\"1952-06-01T00:00:00\",\"1952-07-01T00:00:00\",\"1952-08-01T00:00:00\",\"1952-09-01T00:00:00\",\"1952-10-01T00:00:00\",\"1952-11-01T00:00:00\",\"1952-12-01T00:00:00\",\"1953-01-01T00:00:00\",\"1953-02-01T00:00:00\",\"1953-03-01T00:00:00\",\"1953-04-01T00:00:00\",\"1953-05-01T00:00:00\",\"1953-06-01T00:00:00\",\"1953-07-01T00:00:00\",\"1953-08-01T00:00:00\",\"1953-09-01T00:00:00\",\"1953-10-01T00:00:00\",\"1953-11-01T00:00:00\",\"1953-12-01T00:00:00\",\"1954-01-01T00:00:00\",\"1954-02-01T00:00:00\",\"1954-03-01T00:00:00\",\"1954-04-01T00:00:00\",\"1954-05-01T00:00:00\",\"1954-06-01T00:00:00\",\"1954-07-01T00:00:00\",\"1954-08-01T00:00:00\",\"1954-09-01T00:00:00\",\"1954-10-01T00:00:00\",\"1954-11-01T00:00:00\",\"1954-12-01T00:00:00\",\"1955-01-01T00:00:00\",\"1955-02-01T00:00:00\",\"1955-03-01T00:00:00\",\"1955-04-01T00:00:00\",\"1955-05-01T00:00:00\",\"1955-06-01T00:00:00\",\"1955-07-01T00:00:00\",\"1955-08-01T00:00:00\",\"1955-09-01T00:00:00\",\"1955-10-01T00:00:00\",\"1955-11-01T00:00:00\",\"1955-12-01T00:00:00\",\"1956-01-01T00:00:00\",\"1956-02-01T00:00:00\",\"1956-03-01T00:00:00\",\"1956-04-01T00:00:00\",\"1956-05-01T00:00:00\",\"1956-06-01T00:00:00\",\"1956-07-01T00:00:00\",\"1956-08-01T00:00:00\",\"1956-09-01T00:00:00\",\"1956-10-01T00:00:00\",\"1956-11-01T00:00:00\",\"1956-12-01T00:00:00\",\"1957-01-01T00:00:00\",\"1957-02-01T00:00:00\",\"1957-03-01T00:00:00\",\"1957-04-01T00:00:00\",\"1957-05-01T00:00:00\",\"1957-06-01T00:00:00\",\"1957-07-01T00:00:00\",\"1957-08-01T00:00:00\",\"1957-09-01T00:00:00\",\"1957-10-01T00:00:00\",\"1957-11-01T00:00:00\",\"1957-12-01T00:00:00\",\"1958-01-01T00:00:00\",\"1958-02-01T00:00:00\",\"1958-03-01T00:00:00\",\"1958-04-01T00:00:00\",\"1958-05-01T00:00:00\",\"1958-06-01T00:00:00\",\"1958-07-01T00:00:00\",\"1958-08-01T00:00:00\",\"1958-09-01T00:00:00\",\"1958-10-01T00:00:00\",\"1958-11-01T00:00:00\",\"1958-12-01T00:00:00\",\"1959-01-01T00:00:00\",\"1959-02-01T00:00:00\",\"1959-03-01T00:00:00\",\"1959-04-01T00:00:00\",\"1959-05-01T00:00:00\",\"1959-06-01T00:00:00\",\"1959-07-01T00:00:00\",\"1959-08-01T00:00:00\",\"1959-09-01T00:00:00\",\"1959-10-01T00:00:00\",\"1959-11-01T00:00:00\",\"1959-12-01T00:00:00\",\"1960-01-01T00:00:00\",\"1960-02-01T00:00:00\",\"1960-03-01T00:00:00\",\"1960-04-01T00:00:00\",\"1960-05-01T00:00:00\",\"1960-06-01T00:00:00\",\"1960-07-01T00:00:00\",\"1960-08-01T00:00:00\",\"1960-09-01T00:00:00\",\"1960-10-01T00:00:00\",\"1960-11-01T00:00:00\",\"1960-12-01T00:00:00\"],\"y\":[112.0,118.0,132.0,129.0,121.0,135.0,148.0,148.0,136.0,119.0,104.0,118.0,115.0,126.0,141.0,135.0,125.0,149.0,170.0,170.0,158.0,133.0,114.0,140.0,145.0,150.0,178.0,163.0,172.0,178.0,199.0,199.0,184.0,162.0,146.0,166.0,171.0,180.0,193.0,181.0,183.0,218.0,230.0,242.0,209.0,191.0,172.0,194.0,196.0,196.0,236.0,235.0,229.0,243.0,264.0,272.0,237.0,211.0,180.0,201.0,204.0,188.0,235.0,227.0,234.0,264.0,302.0,293.0,259.0,229.0,203.0,229.0,242.0,233.0,267.0,269.0,270.0,315.0,364.0,347.0,312.0,274.0,237.0,278.0,284.0,277.0,317.0,313.0,318.0,374.0,413.0,405.0,355.0,306.0,271.0,306.0,315.0,301.0,356.0,348.0,355.0,422.0,465.0,467.0,404.0,347.0,305.0,336.0,340.0,318.0,362.0,348.0,363.0,435.0,491.0,505.0,404.0,359.0,310.0,337.0,360.0,342.0,406.0,396.0,420.0,472.0,548.0,559.0,463.0,407.0,362.0,405.0,417.0,391.0,419.0,461.0,472.0,535.0,622.0,606.0,508.0,461.0,390.0,432.0]}], {\"showlegend\":true,\"template\":{\"data\":{\"bar\":[{\"error_x\":{\"color\":\"rgb(51,51,51)\"},\"error_y\":{\"color\":\"rgb(51,51,51)\"},\"marker\":{\"line\":{\"color\":\"rgb(237,237,237)\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"rgb(237,237,237)\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"rgb(51,51,51)\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"rgb(51,51,51)\"},\"baxis\":{\"endlinecolor\":\"rgb(51,51,51)\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"rgb(51,51,51)\"},\"type\":\"carpet\"}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"type\":\"choropleth\"}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"contour\"}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"type\":\"contourcarpet\"}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"heatmap\"}],\"heatmapgl\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"heatmapgl\"}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"histogram2d\"}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"histogram2dcontour\"}],\"mesh3d\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"type\":\"mesh3d\"}],\"parcoords\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"parcoords\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}],\"scatter\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatter\"}],\"scatter3d\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatter3d\"}],\"scattercarpet\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattercarpet\"}],\"scattergeo\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattergeo\"}],\"scattergl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattergl\"}],\"scattermapbox\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattermapbox\"}],\"scatterpolar\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatterpolar\"}],\"scatterpolargl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatterpolargl\"}],\"scatterternary\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatterternary\"}],\"surface\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"surface\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"rgb(237,237,237)\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"rgb(217,217,217)\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}]},\"layout\":{\"annotationdefaults\":{\"arrowhead\":0,\"arrowwidth\":1},\"autotypenumbers\":\"strict\",\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"colorscale\":{\"sequential\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"sequentialminus\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]]},\"colorway\":[\"#F8766D\",\"#A3A500\",\"#00BF7D\",\"#00B0F6\",\"#E76BF3\"],\"font\":{\"color\":\"rgb(51,51,51)\"},\"geo\":{\"bgcolor\":\"white\",\"lakecolor\":\"white\",\"landcolor\":\"rgb(237,237,237)\",\"showlakes\":true,\"showland\":true,\"subunitcolor\":\"white\"},\"hoverlabel\":{\"align\":\"left\"},\"hovermode\":\"closest\",\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"rgb(237,237,237)\",\"polar\":{\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"},\"bgcolor\":\"rgb(237,237,237)\",\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"}},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"rgb(237,237,237)\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"zerolinecolor\":\"white\"},\"yaxis\":{\"backgroundcolor\":\"rgb(237,237,237)\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"zerolinecolor\":\"white\"},\"zaxis\":{\"backgroundcolor\":\"rgb(237,237,237)\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"zerolinecolor\":\"white\"}},\"shapedefaults\":{\"fillcolor\":\"black\",\"line\":{\"width\":0},\"opacity\":0.3},\"ternary\":{\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"},\"bgcolor\":\"rgb(237,237,237)\",\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"}},\"xaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\"},\"yaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\"}}},\"title\":{\"text\":\"Actual vs. Forecast | Number of airline passengers\"},\"xaxis\":{\"title\":{\"text\":\"Time\"}},\"yaxis\":{\"title\":{\"text\":\"Values\"}}}, {\"responsive\": true} ).then(function(){\n",
" \n",
"var gd = document.getElementById('118c493b-a695-4729-9766-fae1208eb430');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" }) }; </script> </div>\n",
"</body>\n",
"</html>"
]
},
"metadata": {}
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "quem5swS7U76"
},
"source": [
"## Step 4: Finalize the model"
]
},
{
"cell_type": "code",
"metadata": {
"id": "rmMCdxFc6aco"
},
"source": [
"# Finalize the model if happy with the results.\n",
"# This trains the model on the entire dataset now\n",
"final_model = exp.finalize_model(blender)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 542
},
"id": "-D4jKhsj6s_9",
"outputId": "bb3147a8-2d92-416c-ff38-b75bf373b745"
},
"source": [
"exp.plot_model(final_model)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<html>\n",
"<head><meta charset=\"utf-8\" /></head>\n",
"<body>\n",
" <div> <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script> <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
" <script src=\"https://cdn.plot.ly/plotly-2.4.2.min.js\"></script> <div id=\"0d2476df-9dc4-4e3b-a44a-6593319fcf08\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"0d2476df-9dc4-4e3b-a44a-6593319fcf08\")) { Plotly.newPlot( \"0d2476df-9dc4-4e3b-a44a-6593319fcf08\", [{\"line\":{\"color\":\"#1f77b4\"},\"marker\":{\"size\":5},\"mode\":\"lines+markers\",\"name\":\"Forecast | Exponential Smoothing\",\"showlegend\":true,\"type\":\"scatter\",\"x\":[\"1961-01-01T00:00:00\",\"1961-02-01T00:00:00\",\"1961-03-01T00:00:00\",\"1961-04-01T00:00:00\",\"1961-05-01T00:00:00\",\"1961-06-01T00:00:00\",\"1961-07-01T00:00:00\",\"1961-08-01T00:00:00\",\"1961-09-01T00:00:00\",\"1961-10-01T00:00:00\",\"1961-11-01T00:00:00\",\"1961-12-01T00:00:00\"],\"y\":[450.3183,425.8193,476.209,506.2128,519.3201,589.8758,681.02,672.9888,564.2336,505.6469,434.0557,484.2149]},{\"marker\":{\"color\":\"#3f3f3f\",\"size\":5},\"mode\":\"lines+markers\",\"name\":\"Original\",\"showlegend\":true,\"type\":\"scatter\",\"x\":[\"1949-01-01T00:00:00\",\"1949-02-01T00:00:00\",\"1949-03-01T00:00:00\",\"1949-04-01T00:00:00\",\"1949-05-01T00:00:00\",\"1949-06-01T00:00:00\",\"1949-07-01T00:00:00\",\"1949-08-01T00:00:00\",\"1949-09-01T00:00:00\",\"1949-10-01T00:00:00\",\"1949-11-01T00:00:00\",\"1949-12-01T00:00:00\",\"1950-01-01T00:00:00\",\"1950-02-01T00:00:00\",\"1950-03-01T00:00:00\",\"1950-04-01T00:00:00\",\"1950-05-01T00:00:00\",\"1950-06-01T00:00:00\",\"1950-07-01T00:00:00\",\"1950-08-01T00:00:00\",\"1950-09-01T00:00:00\",\"1950-10-01T00:00:00\",\"1950-11-01T00:00:00\",\"1950-12-01T00:00:00\",\"1951-01-01T00:00:00\",\"1951-02-01T00:00:00\",\"1951-03-01T00:00:00\",\"1951-04-01T00:00:00\",\"1951-05-01T00:00:00\",\"1951-06-01T00:00:00\",\"1951-07-01T00:00:00\",\"1951-08-01T00:00:00\",\"1951-09-01T00:00:00\",\"1951-10-01T00:00:00\",\"1951-11-01T00:00:00\",\"1951-12-01T00:00:00\",\"1952-01-01T00:00:00\",\"1952-02-01T00:00:00\",\"1952-03-01T00:00:00\",\"1952-04-01T00:00:00\",\"1952-05-01T00:00:00\",\"1952-06-01T00:00:00\",\"1952-07-01T00:00:00\",\"1952-08-01T00:00:00\",\"1952-09-01T00:00:00\",\"1952-10-01T00:00:00\",\"1952-11-01T00:00:00\",\"1952-12-01T00:00:00\",\"1953-01-01T00:00:00\",\"1953-02-01T00:00:00\",\"1953-03-01T00:00:00\",\"1953-04-01T00:00:00\",\"1953-05-01T00:00:00\",\"1953-06-01T00:00:00\",\"1953-07-01T00:00:00\",\"1953-08-01T00:00:00\",\"1953-09-01T00:00:00\",\"1953-10-01T00:00:00\",\"1953-11-01T00:00:00\",\"1953-12-01T00:00:00\",\"1954-01-01T00:00:00\",\"1954-02-01T00:00:00\",\"1954-03-01T00:00:00\",\"1954-04-01T00:00:00\",\"1954-05-01T00:00:00\",\"1954-06-01T00:00:00\",\"1954-07-01T00:00:00\",\"1954-08-01T00:00:00\",\"1954-09-01T00:00:00\",\"1954-10-01T00:00:00\",\"1954-11-01T00:00:00\",\"1954-12-01T00:00:00\",\"1955-01-01T00:00:00\",\"1955-02-01T00:00:00\",\"1955-03-01T00:00:00\",\"1955-04-01T00:00:00\",\"1955-05-01T00:00:00\",\"1955-06-01T00:00:00\",\"1955-07-01T00:00:00\",\"1955-08-01T00:00:00\",\"1955-09-01T00:00:00\",\"1955-10-01T00:00:00\",\"1955-11-01T00:00:00\",\"1955-12-01T00:00:00\",\"1956-01-01T00:00:00\",\"1956-02-01T00:00:00\",\"1956-03-01T00:00:00\",\"1956-04-01T00:00:00\",\"1956-05-01T00:00:00\",\"1956-06-01T00:00:00\",\"1956-07-01T00:00:00\",\"1956-08-01T00:00:00\",\"1956-09-01T00:00:00\",\"1956-10-01T00:00:00\",\"1956-11-01T00:00:00\",\"1956-12-01T00:00:00\",\"1957-01-01T00:00:00\",\"1957-02-01T00:00:00\",\"1957-03-01T00:00:00\",\"1957-04-01T00:00:00\",\"1957-05-01T00:00:00\",\"1957-06-01T00:00:00\",\"1957-07-01T00:00:00\",\"1957-08-01T00:00:00\",\"1957-09-01T00:00:00\",\"1957-10-01T00:00:00\",\"1957-11-01T00:00:00\",\"1957-12-01T00:00:00\",\"1958-01-01T00:00:00\",\"1958-02-01T00:00:00\",\"1958-03-01T00:00:00\",\"1958-04-01T00:00:00\",\"1958-05-01T00:00:00\",\"1958-06-01T00:00:00\",\"1958-07-01T00:00:00\",\"1958-08-01T00:00:00\",\"1958-09-01T00:00:00\",\"1958-10-01T00:00:00\",\"1958-11-01T00:00:00\",\"1958-12-01T00:00:00\",\"1959-01-01T00:00:00\",\"1959-02-01T00:00:00\",\"1959-03-01T00:00:00\",\"1959-04-01T00:00:00\",\"1959-05-01T00:00:00\",\"1959-06-01T00:00:00\",\"1959-07-01T00:00:00\",\"1959-08-01T00:00:00\",\"1959-09-01T00:00:00\",\"1959-10-01T00:00:00\",\"1959-11-01T00:00:00\",\"1959-12-01T00:00:00\",\"1960-01-01T00:00:00\",\"1960-02-01T00:00:00\",\"1960-03-01T00:00:00\",\"1960-04-01T00:00:00\",\"1960-05-01T00:00:00\",\"1960-06-01T00:00:00\",\"1960-07-01T00:00:00\",\"1960-08-01T00:00:00\",\"1960-09-01T00:00:00\",\"1960-10-01T00:00:00\",\"1960-11-01T00:00:00\",\"1960-12-01T00:00:00\"],\"y\":[112.0,118.0,132.0,129.0,121.0,135.0,148.0,148.0,136.0,119.0,104.0,118.0,115.0,126.0,141.0,135.0,125.0,149.0,170.0,170.0,158.0,133.0,114.0,140.0,145.0,150.0,178.0,163.0,172.0,178.0,199.0,199.0,184.0,162.0,146.0,166.0,171.0,180.0,193.0,181.0,183.0,218.0,230.0,242.0,209.0,191.0,172.0,194.0,196.0,196.0,236.0,235.0,229.0,243.0,264.0,272.0,237.0,211.0,180.0,201.0,204.0,188.0,235.0,227.0,234.0,264.0,302.0,293.0,259.0,229.0,203.0,229.0,242.0,233.0,267.0,269.0,270.0,315.0,364.0,347.0,312.0,274.0,237.0,278.0,284.0,277.0,317.0,313.0,318.0,374.0,413.0,405.0,355.0,306.0,271.0,306.0,315.0,301.0,356.0,348.0,355.0,422.0,465.0,467.0,404.0,347.0,305.0,336.0,340.0,318.0,362.0,348.0,363.0,435.0,491.0,505.0,404.0,359.0,310.0,337.0,360.0,342.0,406.0,396.0,420.0,472.0,548.0,559.0,463.0,407.0,362.0,405.0,417.0,391.0,419.0,461.0,472.0,535.0,622.0,606.0,508.0,461.0,390.0,432.0]}], {\"showlegend\":true,\"template\":{\"data\":{\"bar\":[{\"error_x\":{\"color\":\"rgb(51,51,51)\"},\"error_y\":{\"color\":\"rgb(51,51,51)\"},\"marker\":{\"line\":{\"color\":\"rgb(237,237,237)\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"rgb(237,237,237)\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"rgb(51,51,51)\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"rgb(51,51,51)\"},\"baxis\":{\"endlinecolor\":\"rgb(51,51,51)\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"rgb(51,51,51)\"},\"type\":\"carpet\"}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"type\":\"choropleth\"}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"contour\"}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"type\":\"contourcarpet\"}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"heatmap\"}],\"heatmapgl\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"heatmapgl\"}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"histogram2d\"}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"histogram2dcontour\"}],\"mesh3d\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"type\":\"mesh3d\"}],\"parcoords\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"parcoords\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}],\"scatter\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatter\"}],\"scatter3d\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatter3d\"}],\"scattercarpet\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattercarpet\"}],\"scattergeo\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattergeo\"}],\"scattergl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattergl\"}],\"scattermapbox\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scattermapbox\"}],\"scatterpolar\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatterpolar\"}],\"scatterpolargl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatterpolargl\"}],\"scatterternary\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"type\":\"scatterternary\"}],\"surface\":[{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"},\"colorscale\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"type\":\"surface\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"rgb(237,237,237)\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"rgb(217,217,217)\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}]},\"layout\":{\"annotationdefaults\":{\"arrowhead\":0,\"arrowwidth\":1},\"autotypenumbers\":\"strict\",\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"tickcolor\":\"rgb(237,237,237)\",\"ticklen\":6,\"ticks\":\"inside\"}},\"colorscale\":{\"sequential\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]],\"sequentialminus\":[[0,\"rgb(20,44,66)\"],[1,\"rgb(90,179,244)\"]]},\"colorway\":[\"#F8766D\",\"#A3A500\",\"#00BF7D\",\"#00B0F6\",\"#E76BF3\"],\"font\":{\"color\":\"rgb(51,51,51)\"},\"geo\":{\"bgcolor\":\"white\",\"lakecolor\":\"white\",\"landcolor\":\"rgb(237,237,237)\",\"showlakes\":true,\"showland\":true,\"subunitcolor\":\"white\"},\"hoverlabel\":{\"align\":\"left\"},\"hovermode\":\"closest\",\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"rgb(237,237,237)\",\"polar\":{\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"},\"bgcolor\":\"rgb(237,237,237)\",\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"}},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"rgb(237,237,237)\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"zerolinecolor\":\"white\"},\"yaxis\":{\"backgroundcolor\":\"rgb(237,237,237)\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"zerolinecolor\":\"white\"},\"zaxis\":{\"backgroundcolor\":\"rgb(237,237,237)\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"zerolinecolor\":\"white\"}},\"shapedefaults\":{\"fillcolor\":\"black\",\"line\":{\"width\":0},\"opacity\":0.3},\"ternary\":{\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"},\"bgcolor\":\"rgb(237,237,237)\",\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\"}},\"xaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\"},\"yaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showgrid\":true,\"tickcolor\":\"rgb(51,51,51)\",\"ticks\":\"outside\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\"}}},\"title\":{\"text\":\"Actual vs. Forecast | Number of airline passengers\"},\"xaxis\":{\"title\":{\"text\":\"Time\"}},\"yaxis\":{\"title\":{\"text\":\"Values\"}}}, {\"responsive\": true} ).then(function(){\n",
" \n",
"var gd = document.getElementById('0d2476df-9dc4-4e3b-a44a-6593319fcf08');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" }) }; </script> </div>\n",
"</body>\n",
"</html>"
]
},
"metadata": {}
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "7j8KaRNu7Zen"
},
"source": [
"## Step 5: Future Predictions"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JHbTKotJ6zhq",
"outputId": "6f84d6d0-5ec5-41c7-ed0c-613f24d1d2df"
},
"source": [
"#### Option 1: Make immediate predictions ----\n",
"exp.predict_model(final_model)"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"1961-01 450.3183\n",
"1961-02 425.8193\n",
"1961-03 476.2090\n",
"1961-04 506.2128\n",
"1961-05 519.3201\n",
"1961-06 589.8758\n",
"1961-07 681.0200\n",
"1961-08 672.9888\n",
"1961-09 564.2336\n",
"1961-10 505.6469\n",
"1961-11 434.0557\n",
"1961-12 484.2149\n",
"Freq: M, Name: Number of airline passengers, dtype: float64"
]
},
"metadata": {},
"execution_count": 10
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "2DoAHajo79qK",
"outputId": "2c85ba1b-e1f6-45bf-c2cb-77dce32190d2"
},
"source": [
"#### Option 2: Just save the model now and load it later for predictions ----\n",
"# Saves a pkl file\n",
"exp.save_model(final_model, \"my_best_model\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Transformation Pipeline and Model Successfully Saved\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(ExponentialSmoothing(damped_trend=False, initial_level=None,\n",
" initial_seasonal=None, initial_trend=None,\n",
" initialization_method='estimated', seasonal='add', sp=12,\n",
" trend='add', use_boxcox=True), 'my_best_model.pkl')"
]
},
"metadata": {},
"execution_count": 11
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "SUkJFVHK8N4Y",
"outputId": "b3177e68-ac82-4ba0-98a8-154cb3616ab8"
},
"source": [
"# Then later, load this model in a different environment and make predictions\n",
"exp_l = TimeSeriesExperiment()\n",
"loaded_model = exp_l.load_model(\"my_best_model\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Transformation Pipeline and Model Successfully Loaded\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "HaEYpTkx8c1F",
"outputId": "11f5968d-095c-4e00-c8be-75ce388e6819"
},
"source": [
"exp_l.predict_model(loaded_model)"
],
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"1961-01 450.3183\n",
"1961-02 425.8193\n",
"1961-03 476.2090\n",
"1961-04 506.2128\n",
"1961-05 519.3201\n",
"1961-06 589.8758\n",
"1961-07 681.0200\n",
"1961-08 672.9888\n",
"1961-09 564.2336\n",
"1961-10 505.6469\n",
"1961-11 434.0557\n",
"1961-12 484.2149\n",
"Freq: M, dtype: float64"
]
},
"metadata": {},
"execution_count": 13
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "yER3tjaH8jRS"
},
"source": [
"Happy forecasting!"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment