{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "test_notebook_model_deployment_azure_gcp_classification.ipynb", "provenance": [], "collapsed_sections": [], "include_colab_link": true }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "aa085a97390d4dfbad05ee40637f92ff": { "model_module": "@jupyter-widgets/controls", "model_name": "IntProgressModel", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_25dd5860e4a2432c8ccedab57e49d416", "_dom_classes": [], "description": "Processing: ", "_model_name": "IntProgressModel", "bar_style": "", "max": 13, "_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_070deab125f34d21a52c1a6739c01248" } }, "25dd5860e4a2432c8ccedab57e49d416": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "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" } }, "070deab125f34d21a52c1a6739c01248": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "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 } }, "e6a988efbd0b4ccf86508eb631a53c27": { "model_module": "@jupyter-widgets/controls", "model_name": "TextModel", "state": { "_view_name": "TextView", "style": "IPY_MODEL_a5eef38b75284ef894c7890820550315", "_dom_classes": [], "description": "", "_model_name": "TextModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "Following data types have been inferred automatically, if they are correct press enter to continue or type 'quit' otherwise.", "_view_count": null, "disabled": false, "_view_module_version": "1.5.0", "continuous_update": true, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_9ecd3015a12b498fbdc3a1e7f9ece621" } }, "a5eef38b75284ef894c7890820550315": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "9ecd3015a12b498fbdc3a1e7f9ece621": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "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": "100%", "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 } }, "cde834ccd7a340d7b775f28c6e723f22": { "model_module": "@jupyter-widgets/controls", "model_name": "IntProgressModel", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_919fb81e19164fa4bba0a89eb4b01cc0", "_dom_classes": [], "description": "Processing: ", "_model_name": "IntProgressModel", "bar_style": "", "max": 14, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 14, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_30796291c40848778ba283225350cc30" } }, "919fb81e19164fa4bba0a89eb4b01cc0": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "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" } }, "30796291c40848778ba283225350cc30": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "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 } }, "c2bf7e77cf3442e381aa178f42a621e9": { "model_module": "@jupyter-widgets/controls", "model_name": "IntProgressModel", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_000c5b9811a942019a2783601f7aa4fd", "_dom_classes": [], "description": "Processing: ", "_model_name": "IntProgressModel", "bar_style": "", "max": 16, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 16, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_cc386b47cecb458d8e2cfb43f6519770" } }, "000c5b9811a942019a2783601f7aa4fd": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "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" } }, "cc386b47cecb458d8e2cfb43f6519770": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "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": [ "\"Open" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "Y57RMM1LEQmR" }, "source": [ "# Binary Classification Tutorial (CLF101) - Level Beginner" ] }, { "cell_type": "code", "metadata": { "id": "LrRweUsz9bSl", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "outputId": "5851e7fa-b6d8-409a-8e0d-c63fd4b843f7" }, "source": [ "! pip uninstall pycaret\n", "!pip install git+https://github.com/amjadraza/pycaret.git@feature/gcp_azure_np_docs" ], "execution_count": 1, "outputs": [ { "output_type": "stream", "text": [ "\u001b[33mWARNING: Skipping pycaret as it is not installed.\u001b[0m\n", "Collecting git+https://github.com/amjadraza/pycaret.git@feature/gcp_azure_np_docs\n", " Cloning https://github.com/amjadraza/pycaret.git (to revision feature/gcp_azure_np_docs) to /tmp/pip-req-build-8ekfql65\n", " Running command git clone -q https://github.com/amjadraza/pycaret.git /tmp/pip-req-build-8ekfql65\n", " Running command git checkout -b feature/gcp_azure_np_docs --track origin/feature/gcp_azure_np_docs\n", " Switched to a new branch 'feature/gcp_azure_np_docs'\n", " Branch 'feature/gcp_azure_np_docs' set up to track remote branch 'feature/gcp_azure_np_docs' from 'origin'.\n", "Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (1.0.5)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (1.18.5)\n", "Requirement already satisfied: seaborn in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.10.1)\n", "Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (3.2.2)\n", "Requirement already satisfied: IPython in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (5.5.0)\n", "Requirement already satisfied: joblib in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.16.0)\n", "Collecting scikit-learn>=0.23\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/5c/a1/273def87037a7fb010512bbc5901c31cfddfca8080bc63b42b26e3cc55b3/scikit_learn-0.23.2-cp36-cp36m-manylinux1_x86_64.whl (6.8MB)\n", "\u001b[K |████████████████████████████████| 6.8MB 2.8MB/s \n", "\u001b[?25hRequirement already satisfied: ipywidgets in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (7.5.1)\n", "Collecting yellowbrick>=1.0.1\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/13/95/a14e4fdfb8b1c8753bbe74a626e910a98219ef9c87c6763585bbd30d84cf/yellowbrick-1.1-py3-none-any.whl (263kB)\n", "\u001b[K |████████████████████████████████| 266kB 44.9MB/s \n", "\u001b[?25hRequirement already satisfied: xgboost>=0.90 in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.90)\n", "Collecting lightgbm>=2.3.1\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/0b/9d/ddcb2f43aca194987f1a99e27edf41cf9bc39ea750c3371c2a62698c509a/lightgbm-2.3.1-py2.py3-none-manylinux1_x86_64.whl (1.2MB)\n", "\u001b[K |████████████████████████████████| 1.2MB 44.5MB/s \n", "\u001b[?25hRequirement already satisfied: plotly>=4.4.1 in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (4.4.1)\n", "Requirement already satisfied: wordcloud in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (1.5.0)\n", "Requirement already satisfied: textblob in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.15.3)\n", "Requirement already satisfied: cufflinks>=0.17.0 in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.17.3)\n", "Requirement already satisfied: umap-learn in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.4.6)\n", "Collecting pyLDAvis\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a5/3a/af82e070a8a96e13217c8f362f9a73e82d61ac8fff3a2561946a97f96266/pyLDAvis-2.1.2.tar.gz (1.6MB)\n", "\u001b[K |████████████████████████████████| 1.6MB 41.6MB/s \n", "\u001b[?25hRequirement already satisfied: gensim in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (3.6.0)\n", "Requirement already satisfied: spacy in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (2.2.4)\n", "Requirement already satisfied: nltk in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (3.2.5)\n", "Requirement already satisfied: mlxtend in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.14.0)\n", "Collecting pyod\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/77/4e/5767edaccbfc227914ca774cb6ca9b628a08cbb59b9b4839296953a63d34/pyod-0.8.1.tar.gz (93kB)\n", "\u001b[K |████████████████████████████████| 102kB 10.7MB/s \n", "\u001b[?25hCollecting catboost\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/96/6c/6608210b29649267de52001b09e369777ee2a5cfe1c71fa75eba82a4f2dc/catboost-0.24-cp36-none-manylinux1_x86_64.whl (65.9MB)\n", "\u001b[K |████████████████████████████████| 65.9MB 61kB/s \n", "\u001b[?25hCollecting pandas-profiling>=2.8.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/b9/94/ef8ef4517540d13406fcc0b8adfd75336e014242c69bd4162ab46931f36a/pandas_profiling-2.8.0-py2.py3-none-any.whl (259kB)\n", "\u001b[K |████████████████████████████████| 266kB 41.6MB/s \n", "\u001b[?25hCollecting kmodes>=0.10.1\n", " Downloading https://files.pythonhosted.org/packages/b2/55/d8ec1ae1f7e1e202a8a4184c6852a3ee993b202b0459672c699d0ac18fc8/kmodes-0.10.2-py2.py3-none-any.whl\n", "Collecting datefinder>=0.7.0\n", " Downloading https://files.pythonhosted.org/packages/0c/4f/29524c9ca35d2ba1a8a3c6c895b90fc92525cf0fe357f747133890953ebe/datefinder-0.7.1-py2.py3-none-any.whl\n", "Collecting DateTime>=4.3\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/73/22/a5297f3a1f92468cc737f8ce7ba6e5f245fcfafeae810ba37bd1039ea01c/DateTime-4.3-py2.py3-none-any.whl (60kB)\n", "\u001b[K |████████████████████████████████| 61kB 7.6MB/s \n", "\u001b[?25hCollecting mlflow\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/00/2f/2529268d85af0a1521b0b7c137b63b731dff4784e1322fb3055403a959fb/mlflow-1.10.0-py3-none-any.whl (12.4MB)\n", "\u001b[K |████████████████████████████████| 12.4MB 45.1MB/s \n", "\u001b[?25hRequirement already satisfied: imbalanced-learn in /usr/local/lib/python3.6/dist-packages (from pycaret==2.0) (0.4.3)\n", "Requirement already satisfied: python-dateutil>=2.6.1 in /usr/local/lib/python3.6/dist-packages (from pandas->pycaret==2.0) (2.8.1)\n", "Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.6/dist-packages (from pandas->pycaret==2.0) (2018.9)\n", "Requirement already satisfied: scipy>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from seaborn->pycaret==2.0) (1.4.1)\n", "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->pycaret==2.0) (0.10.0)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->pycaret==2.0) (1.2.0)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->pycaret==2.0) (2.4.7)\n", "Requirement already satisfied: decorator in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (4.4.2)\n", "Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (49.2.0)\n", "Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (0.8.1)\n", "Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (4.3.3)\n", "Requirement already satisfied: pexpect; sys_platform != \"win32\" in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (4.8.0)\n", "Requirement already satisfied: pickleshare in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (0.7.5)\n", "Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (1.0.18)\n", "Requirement already satisfied: pygments in /usr/local/lib/python3.6/dist-packages (from IPython->pycaret==2.0) (2.1.3)\n", "Collecting threadpoolctl>=2.0.0\n", " Downloading https://files.pythonhosted.org/packages/f7/12/ec3f2e203afa394a149911729357aa48affc59c20e2c1c8297a60f33f133/threadpoolctl-2.1.0-py3-none-any.whl\n", "Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.6/dist-packages (from ipywidgets->pycaret==2.0) (5.0.7)\n", "Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/lib/python3.6/dist-packages (from ipywidgets->pycaret==2.0) (4.10.1)\n", "Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.6/dist-packages (from ipywidgets->pycaret==2.0) (3.5.1)\n", "Requirement already satisfied: retrying>=1.3.3 in /usr/local/lib/python3.6/dist-packages (from plotly>=4.4.1->pycaret==2.0) (1.3.3)\n", "Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from plotly>=4.4.1->pycaret==2.0) (1.15.0)\n", "Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from wordcloud->pycaret==2.0) (7.0.0)\n", "Requirement already satisfied: colorlover>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from cufflinks>=0.17.0->pycaret==2.0) (0.3.0)\n", "Requirement already satisfied: numba!=0.47,>=0.46 in /usr/local/lib/python3.6/dist-packages (from umap-learn->pycaret==2.0) (0.48.0)\n", "Requirement already satisfied: wheel>=0.23.0 in /usr/local/lib/python3.6/dist-packages (from pyLDAvis->pycaret==2.0) (0.34.2)\n", "Requirement already satisfied: jinja2>=2.7.2 in /usr/local/lib/python3.6/dist-packages (from pyLDAvis->pycaret==2.0) (2.11.2)\n", "Requirement already satisfied: numexpr in /usr/local/lib/python3.6/dist-packages (from pyLDAvis->pycaret==2.0) (2.7.1)\n", "Requirement already satisfied: pytest in /usr/local/lib/python3.6/dist-packages (from pyLDAvis->pycaret==2.0) (3.6.4)\n", "Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from pyLDAvis->pycaret==2.0) (0.16.0)\n", "Collecting funcy\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/ce/4b/6ffa76544e46614123de31574ad95758c421aae391a1764921b8a81e1eae/funcy-1.14.tar.gz (548kB)\n", "\u001b[K |████████████████████████████████| 552kB 45.0MB/s \n", "\u001b[?25hRequirement already satisfied: smart-open>=1.2.1 in /usr/local/lib/python3.6/dist-packages (from gensim->pycaret==2.0) (2.1.0)\n", "Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (1.0.0)\n", "Requirement already satisfied: srsly<1.1.0,>=1.0.2 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (1.0.2)\n", "Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (0.7.1)\n", "Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (1.0.2)\n", "Requirement already satisfied: thinc==7.4.0 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (7.4.0)\n", "Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (2.23.0)\n", "Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (4.41.1)\n", "Requirement already satisfied: plac<1.2.0,>=0.9.6 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (1.1.3)\n", "Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (2.0.3)\n", "Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (3.0.2)\n", "Requirement already satisfied: blis<0.5.0,>=0.4.0 in /usr/local/lib/python3.6/dist-packages (from spacy->pycaret==2.0) (0.4.1)\n", "Collecting combo\n", " Downloading https://files.pythonhosted.org/packages/0a/2a/61b6ac584e75d8df16dc27962aa5fe99d76b09da5b6710e83d4862c84001/combo-0.1.1.tar.gz\n", "Collecting suod\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a1/87/9170cabe1b5e10a7d095c0e28f2e30e7c1886a13f063de85d3cfacc06f4b/suod-0.0.4.tar.gz (2.1MB)\n", "\u001b[K |████████████████████████████████| 2.1MB 41.7MB/s \n", "\u001b[?25hRequirement already satisfied: graphviz in /usr/local/lib/python3.6/dist-packages (from catboost->pycaret==2.0) (0.10.1)\n", "Collecting htmlmin>=0.1.12\n", " Downloading https://files.pythonhosted.org/packages/b3/e7/fcd59e12169de19f0131ff2812077f964c6b960e7c09804d30a7bf2ab461/htmlmin-0.1.12.tar.gz\n", "Collecting confuse>=1.0.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/b5/6d/bedc0d1068bd244cee05843313cbec6cebb9f01f925538269bababc6d887/confuse-1.3.0-py2.py3-none-any.whl (64kB)\n", "\u001b[K |████████████████████████████████| 71kB 8.5MB/s \n", "\u001b[?25hCollecting tangled-up-in-unicode>=0.0.6\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/4a/e2/e588ab9298d4989ce7fdb2b97d18aac878d99dbdc379a4476a09d9271b68/tangled_up_in_unicode-0.0.6-py3-none-any.whl (3.1MB)\n", "\u001b[K |████████████████████████████████| 3.1MB 35.8MB/s \n", "\u001b[?25hRequirement already satisfied: astropy>=4.0 in /usr/local/lib/python3.6/dist-packages (from pandas-profiling>=2.8.0->pycaret==2.0) (4.0.1.post1)\n", "Requirement already satisfied: missingno>=0.4.2 in /usr/local/lib/python3.6/dist-packages (from pandas-profiling>=2.8.0->pycaret==2.0) (0.4.2)\n", "Collecting visions[type_image_path]==0.4.4\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/4a/03/5a45d542257830cf1d9da2cdc1c0bc6f55a9212937b70fdd6d7031b46d6c/visions-0.4.4-py3-none-any.whl (59kB)\n", "\u001b[K |████████████████████████████████| 61kB 7.4MB/s \n", "\u001b[?25hCollecting phik>=0.9.10\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/01/5a/7ef1c04ce62cd72f900c06298dc2385840550d5c653a0dbc19109a5477e6/phik-0.10.0-py3-none-any.whl (599kB)\n", "\u001b[K |████████████████████████████████| 604kB 43.1MB/s \n", "\u001b[?25hRequirement already satisfied: regex>=2017.02.08 in /usr/local/lib/python3.6/dist-packages (from datefinder>=0.7.0->pycaret==2.0) (2019.12.20)\n", "Collecting zope.interface\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/57/33/565274c28a11af60b7cfc0519d46bde4125fcd7d32ebc0a81b480d0e8da6/zope.interface-5.1.0-cp36-cp36m-manylinux2010_x86_64.whl (234kB)\n", "\u001b[K |████████████████████████████████| 235kB 45.4MB/s \n", "\u001b[?25hRequirement already satisfied: sqlparse in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (0.3.1)\n", "Collecting azure-storage-blob>=12.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/6d/3d/31614573e8a197db12d8ab47a7fd813f15bd4a4b5c64e85d23b865de5b9b/azure_storage_blob-12.3.2-py2.py3-none-any.whl (280kB)\n", "\u001b[K |████████████████████████████████| 286kB 49.3MB/s \n", "\u001b[?25hRequirement already satisfied: entrypoints in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (0.3)\n", "Collecting alembic\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/60/1e/cabc75a189de0fbb2841d0975243e59bde8b7822bacbb95008ac6fe9ad47/alembic-1.4.2.tar.gz (1.1MB)\n", "\u001b[K |████████████████████████████████| 1.1MB 42.0MB/s \n", "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", " Preparing wheel metadata ... \u001b[?25l\u001b[?25hdone\n", "Collecting gitpython>=2.1.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f9/1e/a45320cab182bf1c8656107b3d4c042e659742822fc6bff150d769a984dd/GitPython-3.1.7-py3-none-any.whl (158kB)\n", "\u001b[K |████████████████████████████████| 163kB 46.1MB/s \n", "\u001b[?25hRequirement already satisfied: pyyaml in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (3.13)\n", "Collecting databricks-cli>=0.8.7\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1e/57/5c2d6b83cb8753d12f548e89f91037632baa8289677c1b2ab2adf14bf6b2/databricks-cli-0.11.0.tar.gz (49kB)\n", "\u001b[K |████████████████████████████████| 51kB 6.0MB/s \n", "\u001b[?25hCollecting gorilla\n", " Downloading https://files.pythonhosted.org/packages/e3/56/5a683944cbfc77e429c6f03c636ca50504a785f60ffae91ddd7f5f7bb520/gorilla-0.3.0-py2.py3-none-any.whl\n", "Collecting sqlalchemy<=1.3.13\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/af/47/35edeb0f86c0b44934c05d961c893e223ef27e79e1f53b5e6f14820ff553/SQLAlchemy-1.3.13.tar.gz (6.0MB)\n", "\u001b[K |████████████████████████████████| 6.0MB 42.4MB/s \n", "\u001b[?25hRequirement already satisfied: click>=7.0 in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (7.1.2)\n", "Requirement already satisfied: Flask in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (1.1.2)\n", "Collecting gunicorn; platform_system != \"Windows\"\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/69/ca/926f7cd3a2014b16870086b2d0fdc84a9e49473c68a8dff8b57f7c156f43/gunicorn-20.0.4-py2.py3-none-any.whl (77kB)\n", "\u001b[K |████████████████████████████████| 81kB 9.7MB/s \n", "\u001b[?25hCollecting docker>=4.0.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/65/10/d18c41f2bd846c89c9030424a58be3d9752fac27780f8608284fa893feb4/docker-4.3.0-py2.py3-none-any.whl (145kB)\n", "\u001b[K |████████████████████████████████| 153kB 49.9MB/s \n", "\u001b[?25hRequirement already satisfied: cloudpickle in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (1.3.0)\n", "Requirement already satisfied: protobuf>=3.6.0 in /usr/local/lib/python3.6/dist-packages (from mlflow->pycaret==2.0) (3.12.4)\n", "Collecting querystring-parser\n", " Downloading https://files.pythonhosted.org/packages/4a/fa/f54f5662e0eababf0c49e92fd94bf178888562c0e7b677c8941bbbcd1bd6/querystring_parser-1.2.4.tar.gz\n", "Collecting prometheus-flask-exporter\n", " Downloading https://files.pythonhosted.org/packages/84/b0/7549899a75e7ef0be5f8969094d0709e5dcc51dc21d58cc86b8d69441dce/prometheus_flask_exporter-0.15.4.tar.gz\n", "Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.6/dist-packages (from traitlets>=4.2->IPython->pycaret==2.0) (0.2.0)\n", "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.6/dist-packages (from pexpect; sys_platform != \"win32\"->IPython->pycaret==2.0) (0.6.0)\n", "Requirement already satisfied: wcwidth in /usr/local/lib/python3.6/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->IPython->pycaret==2.0) (0.2.5)\n", "Requirement already satisfied: jupyter-core in /usr/local/lib/python3.6/dist-packages (from nbformat>=4.2.0->ipywidgets->pycaret==2.0) (4.6.3)\n", "Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python3.6/dist-packages (from nbformat>=4.2.0->ipywidgets->pycaret==2.0) (2.6.0)\n", "Requirement already satisfied: tornado>=4.0 in /usr/local/lib/python3.6/dist-packages (from ipykernel>=4.5.1->ipywidgets->pycaret==2.0) (5.1.1)\n", "Requirement already satisfied: jupyter-client in /usr/local/lib/python3.6/dist-packages (from ipykernel>=4.5.1->ipywidgets->pycaret==2.0) (5.3.5)\n", "Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.6/dist-packages (from widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (5.3.1)\n", "Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in /usr/local/lib/python3.6/dist-packages (from numba!=0.47,>=0.46->umap-learn->pycaret==2.0) (0.31.0)\n", "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.6/dist-packages (from jinja2>=2.7.2->pyLDAvis->pycaret==2.0) (1.1.1)\n", "Requirement already satisfied: more-itertools>=4.0.0 in /usr/local/lib/python3.6/dist-packages (from pytest->pyLDAvis->pycaret==2.0) (8.4.0)\n", "Requirement already satisfied: py>=1.5.0 in /usr/local/lib/python3.6/dist-packages (from pytest->pyLDAvis->pycaret==2.0) (1.9.0)\n", "Requirement already satisfied: atomicwrites>=1.0 in /usr/local/lib/python3.6/dist-packages (from pytest->pyLDAvis->pycaret==2.0) (1.4.0)\n", "Requirement already satisfied: pluggy<0.8,>=0.5 in /usr/local/lib/python3.6/dist-packages (from pytest->pyLDAvis->pycaret==2.0) (0.7.1)\n", "Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.6/dist-packages (from pytest->pyLDAvis->pycaret==2.0) (19.3.0)\n", "Requirement already satisfied: boto3 in /usr/local/lib/python3.6/dist-packages (from smart-open>=1.2.1->gensim->pycaret==2.0) (1.14.37)\n", "Requirement already satisfied: boto in /usr/local/lib/python3.6/dist-packages (from smart-open>=1.2.1->gensim->pycaret==2.0) (2.49.0)\n", "Requirement already satisfied: importlib-metadata>=0.20; python_version < \"3.8\" in /usr/local/lib/python3.6/dist-packages (from catalogue<1.1.0,>=0.0.7->spacy->pycaret==2.0) (1.7.0)\n", "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0,>=2.13.0->spacy->pycaret==2.0) (3.0.4)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0,>=2.13.0->spacy->pycaret==2.0) (2020.6.20)\n", "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0,>=2.13.0->spacy->pycaret==2.0) (2.10)\n", "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests<3.0.0,>=2.13.0->spacy->pycaret==2.0) (1.24.3)\n", "Requirement already satisfied: networkx>=2.4 in /usr/local/lib/python3.6/dist-packages (from visions[type_image_path]==0.4.4->pandas-profiling>=2.8.0->pycaret==2.0) (2.4)\n", "Collecting imagehash; extra == \"type_image_path\"\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1a/5d/cc81830be3c4705a46cdbca74439b67f1017881383ba0127c41c4cecb7b3/ImageHash-4.1.0.tar.gz (291kB)\n", "\u001b[K |████████████████████████████████| 296kB 46.4MB/s \n", "\u001b[?25hCollecting msrest>=0.6.10\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d9/ed/8e1b75721ad983c1672cd968ad3ae374d2e94767edff6f0b72a15dfde933/msrest-0.6.18-py2.py3-none-any.whl (84kB)\n", "\u001b[K |████████████████████████████████| 92kB 8.6MB/s \n", "\u001b[?25hCollecting azure-core<2.0.0,>=1.6.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/5b/e3/acb0c45c0b7afa33eca9fadb47f32cbfb95161e3719fcbe953d689b881bc/azure_core-1.8.0-py2.py3-none-any.whl (121kB)\n", "\u001b[K |████████████████████████████████| 122kB 48.5MB/s \n", "\u001b[?25hCollecting cryptography>=2.1.4\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/ba/91/84a29d6a27fd6dfc21f475704c4d2053d58ed7a4033c2b0ce1b4ca4d03d9/cryptography-3.0-cp35-abi3-manylinux2010_x86_64.whl (2.7MB)\n", "\u001b[K |████████████████████████████████| 2.7MB 41.3MB/s \n", "\u001b[?25hCollecting Mako\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/a6/37/0e706200d22172eb8fa17d68a7ae22dec7631a0a92266634fb518a88a5b2/Mako-1.1.3-py2.py3-none-any.whl (75kB)\n", "\u001b[K |████████████████████████████████| 81kB 8.6MB/s \n", "\u001b[?25hCollecting python-editor>=0.3\n", " Downloading https://files.pythonhosted.org/packages/c6/d3/201fc3abe391bbae6606e6f1d598c15d367033332bd54352b12f35513717/python_editor-1.0.4-py3-none-any.whl\n", "Collecting gitdb<5,>=4.0.1\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/48/11/d1800bca0a3bae820b84b7d813ad1eff15a48a64caea9c823fc8c1b119e8/gitdb-4.0.5-py3-none-any.whl (63kB)\n", "\u001b[K |████████████████████████████████| 71kB 8.5MB/s \n", "\u001b[?25hRequirement already satisfied: tabulate>=0.7.7 in /usr/local/lib/python3.6/dist-packages (from databricks-cli>=0.8.7->mlflow->pycaret==2.0) (0.8.7)\n", "Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python3.6/dist-packages (from Flask->mlflow->pycaret==2.0) (1.1.0)\n", "Requirement already satisfied: Werkzeug>=0.15 in /usr/local/lib/python3.6/dist-packages (from Flask->mlflow->pycaret==2.0) (1.0.1)\n", "Collecting websocket-client>=0.32.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl (200kB)\n", "\u001b[K |████████████████████████████████| 204kB 45.1MB/s \n", "\u001b[?25hRequirement already satisfied: prometheus_client in /usr/local/lib/python3.6/dist-packages (from prometheus-flask-exporter->mlflow->pycaret==2.0) (0.8.0)\n", "Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.6/dist-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets->pycaret==2.0) (19.0.2)\n", "Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.6/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (0.8.3)\n", "Requirement already satisfied: Send2Trash in /usr/local/lib/python3.6/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (1.5.0)\n", "Requirement already satisfied: nbconvert in /usr/local/lib/python3.6/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (5.6.1)\n", "Requirement already satisfied: botocore<1.18.0,>=1.17.37 in /usr/local/lib/python3.6/dist-packages (from boto3->smart-open>=1.2.1->gensim->pycaret==2.0) (1.17.37)\n", "Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in /usr/local/lib/python3.6/dist-packages (from boto3->smart-open>=1.2.1->gensim->pycaret==2.0) (0.3.3)\n", "Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.6/dist-packages (from boto3->smart-open>=1.2.1->gensim->pycaret==2.0) (0.10.0)\n", "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata>=0.20; python_version < \"3.8\"->catalogue<1.1.0,>=0.0.7->spacy->pycaret==2.0) (3.1.0)\n", "Requirement already satisfied: PyWavelets in /usr/local/lib/python3.6/dist-packages (from imagehash; extra == \"type_image_path\"->visions[type_image_path]==0.4.4->pandas-profiling>=2.8.0->pycaret==2.0) (1.1.1)\n", "Collecting isodate>=0.6.0\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/9b/9f/b36f7774ff5ea8e428fdcfc4bb332c39ee5b9362ddd3d40d9516a55221b2/isodate-0.6.0-py2.py3-none-any.whl (45kB)\n", "\u001b[K |████████████████████████████████| 51kB 6.7MB/s \n", "\u001b[?25hRequirement already satisfied: requests-oauthlib>=0.5.0 in /usr/local/lib/python3.6/dist-packages (from msrest>=0.6.10->azure-storage-blob>=12.0->mlflow->pycaret==2.0) (1.3.0)\n", "Requirement already satisfied: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.6/dist-packages (from cryptography>=2.1.4->azure-storage-blob>=12.0->mlflow->pycaret==2.0) (1.14.1)\n", "Collecting smmap<4,>=3.0.1\n", " Downloading https://files.pythonhosted.org/packages/b0/9a/4d409a6234eb940e6a78dfdfc66156e7522262f5f2fecca07dc55915952d/smmap-3.0.4-py2.py3-none-any.whl\n", "Requirement already satisfied: defusedxml in /usr/local/lib/python3.6/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (0.6.0)\n", "Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.6/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (0.8.4)\n", "Requirement already satisfied: testpath in /usr/local/lib/python3.6/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (0.4.4)\n", "Requirement already satisfied: bleach in /usr/local/lib/python3.6/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (3.1.5)\n", "Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.6/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (1.4.2)\n", "Requirement already satisfied: docutils<0.16,>=0.10 in /usr/local/lib/python3.6/dist-packages (from botocore<1.18.0,>=1.17.37->boto3->smart-open>=1.2.1->gensim->pycaret==2.0) (0.15.2)\n", "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.5.0->msrest>=0.6.10->azure-storage-blob>=12.0->mlflow->pycaret==2.0) (3.1.0)\n", "Requirement already satisfied: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.1.4->azure-storage-blob>=12.0->mlflow->pycaret==2.0) (2.20)\n", "Requirement already satisfied: packaging in /usr/local/lib/python3.6/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (20.4)\n", "Requirement already satisfied: webencodings in /usr/local/lib/python3.6/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets->pycaret==2.0) (0.5.1)\n", "Building wheels for collected packages: alembic\n", " Building wheel for alembic (PEP 517) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for alembic: filename=alembic-1.4.2-cp36-none-any.whl size=159543 sha256=0e4548306278f9cdc23b60ad6efccf6a62d77a0ceb505b75c4b9c1c93ed71bfb\n", " Stored in directory: /root/.cache/pip/wheels/1f/04/83/76023f7a4c14688c0b5c2682a96392cfdd3ee4449eaaa287ef\n", "Successfully built alembic\n", "Building wheels for collected packages: pycaret, pyLDAvis, pyod, funcy, combo, suod, htmlmin, databricks-cli, sqlalchemy, querystring-parser, prometheus-flask-exporter, imagehash\n", " Building wheel for pycaret (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for pycaret: filename=pycaret-2.0-cp36-none-any.whl size=247264 sha256=83e35e710997f5af84e7cc45ee66466b670df71c3ccf45808d33ea12a08eb3fd\n", " Stored in directory: /tmp/pip-ephem-wheel-cache-g42sxwyh/wheels/56/ce/94/89663fa75fe49093e56d12596743a8ccebef655009d58ff0c0\n", " Building wheel for pyLDAvis (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for pyLDAvis: filename=pyLDAvis-2.1.2-py2.py3-none-any.whl size=97711 sha256=e85f0e20938430a9c26923432d9524bd135f17a800fa29cf2332505b1e2206b4\n", " Stored in directory: /root/.cache/pip/wheels/98/71/24/513a99e58bb6b8465bae4d2d5e9dba8f0bef8179e3051ac414\n", " Building wheel for pyod (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for pyod: filename=pyod-0.8.1-cp36-none-any.whl size=105653 sha256=912a9513bb875a7a213541282c6e2c26476e7bae7aaa7f1cf5a5f971e68c5bdc\n", " Stored in directory: /root/.cache/pip/wheels/2e/ca/18/727e9d98a41f5f4385a97d5b429f3a9c8fbee13f9780c18642\n", " Building wheel for funcy (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for funcy: filename=funcy-1.14-py2.py3-none-any.whl size=32042 sha256=82acbe462265ac67777227199726efec123caf0aaa22066487da8ab41e4cce9f\n", " Stored in directory: /root/.cache/pip/wheels/20/5a/d8/1d875df03deae6f178dfdf70238cca33f948ef8a6f5209f2eb\n", " Building wheel for combo (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for combo: filename=combo-0.1.1-cp36-none-any.whl size=42111 sha256=a36d4d3b68f0b152ac726d83ef5ce286d5b7a89d04e1639dfa952d5aa1a8968b\n", " Stored in directory: /root/.cache/pip/wheels/55/ec/e5/a2331372c676c467e70c6646e646edf6997d5c4905b8c0f5e6\n", " Building wheel for suod (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for suod: filename=suod-0.0.4-cp36-none-any.whl size=2167157 sha256=c4e44d4a0a29f967c018ee33a7c59c26bef42b1c2193e2f99f7cb69028da3a73\n", " Stored in directory: /root/.cache/pip/wheels/57/55/e5/a4fca65bba231f6d0115059b589148774b41faea25b3f2aa27\n", " Building wheel for htmlmin (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for htmlmin: filename=htmlmin-0.1.12-cp36-none-any.whl size=27084 sha256=4f3e75dcfcaf09b34c51c6cf5ffc43fc15595afa28e2b1599dc12105847f8c9a\n", " Stored in directory: /root/.cache/pip/wheels/43/07/ac/7c5a9d708d65247ac1f94066cf1db075540b85716c30255459\n", " Building wheel for databricks-cli (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for databricks-cli: filename=databricks_cli-0.11.0-cp36-none-any.whl size=90300 sha256=bdfb360084f1d487618c3701069ef7c93ea2e1ce6ccc475b13d2b034d3baa6ab\n", " Stored in directory: /root/.cache/pip/wheels/63/d0/4f/3deeca1f4c47a6aca7c2c6a6e2bf272391565dc86a7718a59b\n", " Building wheel for sqlalchemy (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for sqlalchemy: filename=SQLAlchemy-1.3.13-cp36-cp36m-linux_x86_64.whl size=1217154 sha256=7e6083e06ca2fae45a46c8565e7ecbc4959a9cb061e69d36c5c65b930bd1ef73\n", " Stored in directory: /root/.cache/pip/wheels/b3/35/98/4c9cb3fd63d21d5606b972dd70643769745adf60e622467b71\n", " Building wheel for querystring-parser (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for querystring-parser: filename=querystring_parser-1.2.4-cp36-none-any.whl size=7079 sha256=799d8534858e4f689b9957a21bb43406cc38cf5098fa8cbbeb5bedcd2dc09ae0\n", " Stored in directory: /root/.cache/pip/wheels/1e/41/34/23ebf5d1089a9aed847951e0ee375426eb4ad0a7079d88d41e\n", " Building wheel for prometheus-flask-exporter (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for prometheus-flask-exporter: filename=prometheus_flask_exporter-0.15.4-cp36-none-any.whl size=16454 sha256=81115b778b9acc3a30825676588a33554197ff8bca30b994e9b0d2a2d6f6df30\n", " Stored in directory: /root/.cache/pip/wheels/4f/b4/70/b18fa12c1c0a30fd542767dbbcdac225c6aae012fa1b3124e4\n", " Building wheel for imagehash (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for imagehash: filename=ImageHash-4.1.0-py2.py3-none-any.whl size=291990 sha256=7956eb816d288ca1e94e13b901bf2880fe200030f648cb2f11cf5e4edbb37b86\n", " Stored in directory: /root/.cache/pip/wheels/07/1c/dc/6831446f09feb8cc199ec73a0f2f0703253f6ae013a22f4be9\n", "Successfully built pycaret pyLDAvis pyod funcy combo suod htmlmin databricks-cli sqlalchemy querystring-parser prometheus-flask-exporter imagehash\n", "\u001b[31mERROR: pandas-profiling 2.8.0 has requirement tqdm>=4.43.0, but you'll have tqdm 4.41.1 which is incompatible.\u001b[0m\n", "Installing collected packages: threadpoolctl, scikit-learn, yellowbrick, lightgbm, funcy, pyLDAvis, combo, suod, pyod, catboost, htmlmin, confuse, tangled-up-in-unicode, imagehash, visions, phik, pandas-profiling, kmodes, datefinder, zope.interface, DateTime, isodate, msrest, azure-core, cryptography, azure-storage-blob, sqlalchemy, Mako, python-editor, alembic, smmap, gitdb, gitpython, databricks-cli, gorilla, gunicorn, websocket-client, docker, querystring-parser, prometheus-flask-exporter, mlflow, pycaret\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", " Found existing installation: yellowbrick 0.9.1\n", " Uninstalling yellowbrick-0.9.1:\n", " Successfully uninstalled yellowbrick-0.9.1\n", " Found existing installation: lightgbm 2.2.3\n", " Uninstalling lightgbm-2.2.3:\n", " Successfully uninstalled lightgbm-2.2.3\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", " Found existing installation: SQLAlchemy 1.3.18\n", " Uninstalling SQLAlchemy-1.3.18:\n", " Successfully uninstalled SQLAlchemy-1.3.18\n", "Successfully installed DateTime-4.3 Mako-1.1.3 alembic-1.4.2 azure-core-1.8.0 azure-storage-blob-12.3.2 catboost-0.24 combo-0.1.1 confuse-1.3.0 cryptography-3.0 databricks-cli-0.11.0 datefinder-0.7.1 docker-4.3.0 funcy-1.14 gitdb-4.0.5 gitpython-3.1.7 gorilla-0.3.0 gunicorn-20.0.4 htmlmin-0.1.12 imagehash-4.1.0 isodate-0.6.0 kmodes-0.10.2 lightgbm-2.3.1 mlflow-1.10.0 msrest-0.6.18 pandas-profiling-2.8.0 phik-0.10.0 prometheus-flask-exporter-0.15.4 pyLDAvis-2.1.2 pycaret-2.0 pyod-0.8.1 python-editor-1.0.4 querystring-parser-1.2.4 scikit-learn-0.23.2 smmap-3.0.4 sqlalchemy-1.3.13 suod-0.0.4 tangled-up-in-unicode-0.0.6 threadpoolctl-2.1.0 visions-0.4.4 websocket-client-0.57.0 yellowbrick-1.1 zope.interface-5.1.0\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "3sXuMNuqG6PG", "colab_type": "code", "colab": {} }, "source": [ "from pycaret.classification import *" ], "execution_count": 7, "outputs": [] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "lUvE187JEQm3", "colab": { "base_uri": "https://localhost:8080/", "height": 224 }, "outputId": "c39d1398-9edf-417f-e888-3590124026f8" }, "source": [ "from pycaret.datasets import get_data\n", "dataset = get_data('credit')" ], "execution_count": 3, "outputs": [ { "output_type": "display_data", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
LIMIT_BALSEXEDUCATIONMARRIAGEAGEPAY_1PAY_2PAY_3PAY_4PAY_5PAY_6BILL_AMT1BILL_AMT2BILL_AMT3BILL_AMT4BILL_AMT5BILL_AMT6PAY_AMT1PAY_AMT2PAY_AMT3PAY_AMT4PAY_AMT5PAY_AMT6default
0200002212422-1-1-2-23913.03102.0689.00.00.00.00.0689.00.00.00.00.01
1900002223400000029239.014027.013559.014331.014948.015549.01518.01500.01000.01000.01000.05000.00
2500002213700000046990.048233.049291.028314.028959.029547.02000.02019.01200.01100.01069.01000.00
35000012157-10-10008617.05670.035835.020940.019146.019131.02000.036681.010000.09000.0689.0679.00
4500001123700000064400.057069.057608.019394.019619.020024.02500.01815.0657.01000.01000.0800.00
\n", "
" ], "text/plain": [ " LIMIT_BAL SEX EDUCATION MARRIAGE ... PAY_AMT4 PAY_AMT5 PAY_AMT6 default\n", "0 20000 2 2 1 ... 0.0 0.0 0.0 1\n", "1 90000 2 2 2 ... 1000.0 1000.0 5000.0 0\n", "2 50000 2 2 1 ... 1100.0 1069.0 1000.0 0\n", "3 50000 1 2 1 ... 9000.0 689.0 679.0 0\n", "4 50000 1 1 2 ... 1000.0 1000.0 800.0 0\n", "\n", "[5 rows x 24 columns]" ] }, "metadata": { "tags": [] } } ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "hXmaL1xFEQnj", "colab": { "base_uri": "https://localhost:8080/", "height": 53 }, "outputId": "00c8ed45-e151-44bf-a5fe-961a1290e253" }, "source": [ "data = dataset.sample(frac=0.95, random_state=786).reset_index(drop=True)\n", "data_unseen = dataset.drop(data.index).reset_index(drop=True)\n", "\n", "print('Data for Modeling: ' + str(data.shape))\n", "print('Unseen Data For Predictions: ' + str(data_unseen.shape))" ], "execution_count": 4, "outputs": [ { "output_type": "stream", "text": [ "Data for Modeling: (22800, 24)\n", "Unseen Data For Predictions: (1200, 24)\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "wGCZvn1K0M9p", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 982, "referenced_widgets": [ "aa085a97390d4dfbad05ee40637f92ff", "25dd5860e4a2432c8ccedab57e49d416", "070deab125f34d21a52c1a6739c01248", "e6a988efbd0b4ccf86508eb631a53c27", "a5eef38b75284ef894c7890820550315", "9ecd3015a12b498fbdc3a1e7f9ece621" ] }, "outputId": "c09bf157-50f1-4b36-cb01-2a0c704dd2d8" }, "source": [ "exp_clf101 = setup(data = data, target = 'default', session_id=123) " ], "execution_count": 5, "outputs": [ { "output_type": "stream", "text": [ "Setup Succesfully Completed!\n" ], "name": "stdout" }, { "output_type": "display_data", "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Description Value
0session_id123
1Target TypeBinary
2Label EncodedNone
3Original Data(22800, 24)
4Missing Values False
5Numeric Features 14
6Categorical Features 9
7Ordinal Features False
8High Cardinality Features False
9High Cardinality Method None
10Sampled Data(22800, 24)
11Transformed Train Set(15959, 91)
12Transformed Test Set(6841, 91)
13Numeric Imputer mean
14Categorical Imputer constant
15Normalize False
16Normalize Method None
17Transformation False
18Transformation Method None
19PCA False
20PCA Method None
21PCA Components None
22Ignore Low Variance False
23Combine Rare Levels False
24Rare Level Threshold None
25Numeric Binning False
26Remove Outliers False
27Outliers Threshold None
28Remove Multicollinearity False
29Multicollinearity Threshold None
30Clustering False
31Clustering Iteration None
32Polynomial Features False
33Polynomial Degree None
34Trignometry Features False
35Polynomial Threshold None
36Group Features False
37Feature Selection False
38Features Selection Threshold None
39Feature Interaction False
40Feature Ratio False
41Interaction Threshold None
42Fix ImbalanceFalse
43Fix Imbalance MethodSMOTE
" ], "text/plain": [ "" ] }, "metadata": { "tags": [] } } ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "FGCoUiQpEQpz", "colab": { "base_uri": "https://localhost:8080/", "height": 292, "referenced_widgets": [ "cde834ccd7a340d7b775f28c6e723f22", "919fb81e19164fa4bba0a89eb4b01cc0", "30796291c40848778ba283225350cc30" ] }, "outputId": "8e3b0b24-53af-41fe-9c59-142dcd952cd8" }, "source": [ "\n", "rf = create_model('rf')" ], "execution_count": 6, "outputs": [ { "output_type": "display_data", "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Accuracy AUC Recall Prec. F1 Kappa MCC
00.80950.75310.34280.62690.44320.34000.3626
10.81270.74510.33990.64520.44530.34530.3710
20.80760.77140.32580.62500.42830.32620.3512
30.79890.71850.31440.58420.40880.30060.3215
40.80510.72490.32290.61290.42300.31910.3428
50.81520.73240.35690.64950.46070.36030.3839
60.80390.72440.33710.60100.43190.32460.3444
70.81580.77110.33990.66300.44940.35230.3807
80.81390.71830.32580.66090.43640.34000.3706
90.81070.74190.35690.62690.45490.35060.3710
Mean0.80930.74010.33630.62950.43820.33590.3600
SD0.00520.01900.01340.02430.01490.01720.0186
" ], "text/plain": [ "" ] }, "metadata": { "tags": [] } } ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "gmaIfnBMEQrE", "colab": { "base_uri": "https://localhost:8080/", "height": 292, "referenced_widgets": [ "c2bf7e77cf3442e381aa178f42a621e9", "000c5b9811a942019a2783601f7aa4fd", "cc386b47cecb458d8e2cfb43f6519770" ] }, "outputId": "b168276a-bdf5-4097-cb6a-c57a8107c5dd" }, "source": [ "tuned_rf = tune_model(rf)" ], "execution_count": 8, "outputs": [ { "output_type": "display_data", "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Accuracy AUC Recall Prec. F1 Kappa MCC
00.82580.78630.36540.70490.48130.38910.4194
10.82270.79770.35410.69440.46900.37580.4066
20.82330.82250.38530.67660.49100.39370.4165
30.81770.77130.35980.66150.46610.36750.3923
40.82270.78050.35130.69660.46700.37430.4059
50.82270.79550.36830.68420.47880.38340.4101
60.81580.75680.33710.66480.44740.35070.3799
70.83770.79410.37680.77330.50670.42310.4623
80.82270.76710.35690.69230.47100.37730.4073
90.81380.78330.36540.63860.46490.36210.3828
Mean0.82250.78550.36200.68870.47430.37970.4083
SD0.00620.01760.01280.03390.01540.01880.0220
" ], "text/plain": [ "" ] }, "metadata": { "tags": [] } } ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "nwaZk6oTEQsi", "colab": { "base_uri": "https://localhost:8080/", "height": 80 }, "outputId": "89fcfb21-9c75-472c-b99e-f30eb4062b23" }, "source": [ "predict_model(tuned_rf);" ], "execution_count": 9, "outputs": [ { "output_type": "display_data", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ModelAccuracyAUCRecallPrec.F1KappaMCC
0Random Forest Classifier0.81350.75630.32450.65910.43490.33830.3688
\n", "
" ], "text/plain": [ " Model Accuracy AUC ... F1 Kappa MCC\n", "0 Random Forest Classifier 0.8135 0.7563 ... 0.4349 0.3383 0.3688\n", "\n", "[1 rows x 8 columns]" ] }, "metadata": { "tags": [] } } ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "r79BGjIfEQs1" }, "source": [ "# 12.0 Finalize Model for Deployment" ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "_--tO4KGEQs-", "colab": {} }, "source": [ "final_rf = finalize_model(tuned_rf)" ], "execution_count": 10, "outputs": [] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "U9W6kXsSEQtQ", "colab": { "base_uri": "https://localhost:8080/", "height": 161 }, "outputId": "304b6389-053e-42ea-a532-aff799a900a9" }, "source": [ "#Final Random Forest model parameters for deployment\n", "print(final_rf)" ], "execution_count": 11, "outputs": [ { "output_type": "stream", "text": [ "RandomForestClassifier(bootstrap=True, ccp_alpha=0.0, class_weight=None,\n", " criterion='gini', max_depth=10, max_features='auto',\n", " max_leaf_nodes=None, max_samples=None,\n", " min_impurity_decrease=0.0, min_impurity_split=None,\n", " min_samples_leaf=2, min_samples_split=10,\n", " min_weight_fraction_leaf=0.0, n_estimators=70, n_jobs=-1,\n", " oob_score=False, random_state=123, verbose=0,\n", " warm_start=False)\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "colab_type": "code", "id": "NJDk3I-EEQtg", "colab": { "base_uri": "https://localhost:8080/", "height": 80 }, "outputId": "376e1d1e-3ab8-4c7e-ec47-9d115dcdb239" }, "source": [ "predict_model(final_rf);" ], "execution_count": 12, "outputs": [ { "output_type": "display_data", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ModelAccuracyAUCRecallPrec.F1KappaMCC
0Random Forest Classifier0.83450.82220.36290.76570.49240.40820.4489
\n", "
" ], "text/plain": [ " Model Accuracy AUC ... F1 Kappa MCC\n", "0 Random Forest Classifier 0.8345 0.8222 ... 0.4924 0.4082 0.4489\n", "\n", "[1 rows x 8 columns]" ] }, "metadata": { "tags": [] } } ] }, { "cell_type": "markdown", "metadata": { "id": "dWU2Dmdx2UNZ", "colab_type": "text" }, "source": [ "# 13.0 Deploy Model on Microsoft Azure\n", "\n", "This is the code to deploy model on Microsft azure using `pycaret` functionalities." ] }, { "cell_type": "code", "metadata": { "id": "PtdFIPJJ0zHX", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 485 }, "outputId": "565fc39a-5f4f-438b-9b39-a8fbff626aa6" }, "source": [ "# ! pip install azure-storage-blob\n", "! pip install awscli\n", "\n" ], "execution_count": 13, "outputs": [ { "output_type": "stream", "text": [ "Collecting awscli\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/db/87/d390c07c9f761c682b71d0c5e99fe46193b91e6140a4dde04044c70fdeb6/awscli-1.18.117-py2.py3-none-any.whl (3.3MB)\n", "\u001b[K |████████████████████████████████| 3.3MB 2.8MB/s \n", "\u001b[?25hRequirement already satisfied: s3transfer<0.4.0,>=0.3.0 in /usr/local/lib/python3.6/dist-packages (from awscli) (0.3.3)\n", "Collecting botocore==1.17.40\n", "\u001b[?25l Downloading https://files.pythonhosted.org/packages/3d/77/4f1f409c9c454ae798cff20744efacd5ca79059159272857636b6b560bf6/botocore-1.17.40-py2.py3-none-any.whl (6.5MB)\n", "\u001b[K |████████████████████████████████| 6.5MB 27.7MB/s \n", "\u001b[?25hRequirement already satisfied: PyYAML<5.4,>=3.10; python_version != \"3.4\" in /usr/local/lib/python3.6/dist-packages (from awscli) (3.13)\n", "Requirement already satisfied: docutils<0.16,>=0.10 in /usr/local/lib/python3.6/dist-packages (from awscli) (0.15.2)\n", "Collecting colorama<0.4.4,>=0.2.5; python_version != \"3.4\"\n", " Downloading https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl\n", "Collecting rsa<=4.5.0,>=3.1.2; python_version != \"3.4\"\n", " Downloading https://files.pythonhosted.org/packages/26/f8/8127fdda0294f044121d20aac7785feb810e159098447967a6103dedfb96/rsa-4.5-py2.py3-none-any.whl\n", "Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.6/dist-packages (from botocore==1.17.40->awscli) (0.10.0)\n", "Requirement already satisfied: urllib3<1.26,>=1.20; python_version != \"3.4\" in /usr/local/lib/python3.6/dist-packages (from botocore==1.17.40->awscli) (1.24.3)\n", "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.6/dist-packages (from botocore==1.17.40->awscli) (2.8.1)\n", "Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.6/dist-packages (from rsa<=4.5.0,>=3.1.2; python_version != \"3.4\"->awscli) (0.4.8)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/dist-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.17.40->awscli) (1.15.0)\n", "Installing collected packages: botocore, colorama, rsa, awscli\n", " Found existing installation: botocore 1.17.37\n", " Uninstalling botocore-1.17.37:\n", " Successfully uninstalled botocore-1.17.37\n", " Found existing installation: rsa 4.6\n", " Uninstalling rsa-4.6:\n", " Successfully uninstalled rsa-4.6\n", "Successfully installed awscli-1.18.117 botocore-1.17.40 colorama-0.4.3 rsa-4.5\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "ImFnwpb52iDl", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 35 }, "outputId": "f2ebf115-0c20-4c8e-f082-4be8125822a4" }, "source": [ "# Enter connection string when running in google colab\n", "connect_str = '' #@param {type:\"string\"}\n", "print(connect_str)" ], "execution_count": 14, "outputs": [ { "output_type": "stream", "text": [ "DefaultEndpointsProtocol=https;AccountName=pycaret;AccountKey=7asiMq0CV03Ez2LdI8jpDsbOWktPA2lp+X2jQTusEvyk65xgggYw6UyWzmKntIWVplGlTiQeizQgYiujNuz55g==;EndpointSuffix=core.windows.net\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "4FolddlO2iTK", "colab_type": "code", "colab": {} }, "source": [ "#! export AZURE_STORAGE_CONNECTION_STRING=connect_str" ], "execution_count": 15, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "q_MZPZ4271g3", "colab_type": "code", "colab": {} }, "source": [ "import os\n", "os.environ['AZURE_STORAGE_CONNECTION_STRING']= connect_str" ], "execution_count": 16, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "wz0YIfLb6iVK", "colab_type": "code", "colab": {} }, "source": [ "! echo $AZURE_STORAGE_CONNECTION_STRING" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "cUOqSvi63m01", "colab_type": "code", "colab": {} }, "source": [ "os.getenv('AZURE_STORAGE_CONNECTION_STRING')" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "H3C-nMpF2iZg", "colab_type": "code", "colab": {} }, "source": [ "authentication = {'container': 'pycaret-cls-10111'}\n", "model_name = 'rf-clf-101'\n", "deploy_model(final_rf, model_name, authentication, platform = 'azure')" ], "execution_count": 20, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "iuBz98UT2icD", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 107 }, "outputId": "c7da0fc9-71aa-40c5-9f73-24c5cf88a538" }, "source": [ "authentication = {'container': 'pycaret-cls-10111'}\n", "model_name = 'rf-clf-101'\n", "model_azure = load_model(model_name, \n", " platform = 'azure', \n", " authentication = authentication,\n", " verbose=True)" ], "execution_count": 21, "outputs": [ { "output_type": "stream", "text": [ "Loading model from Microsoft Azure\n", "\n", "Downloading blob to \n", "\trf-clf-101.pkl\n", "Transformation Pipeline and Model Successfully Loaded\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "aiP_EiLm2iWk", "colab_type": "code", "colab": {} }, "source": [ "\n", "unseen_predictions = predict_model(model_azure, data=data_unseen, verbose=True)" ], "execution_count": 22, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "UkX3mtAD2iJH", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 439 }, "outputId": "77e24380-a438-49a7-e7c8-ad3bde9e9ce1" }, "source": [ "unseen_predictions" ], "execution_count": 23, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
LIMIT_BALSEXEDUCATIONMARRIAGEAGEPAY_1PAY_2PAY_3PAY_4PAY_5PAY_6BILL_AMT1BILL_AMT2BILL_AMT3BILL_AMT4BILL_AMT5BILL_AMT6PAY_AMT1PAY_AMT2PAY_AMT3PAY_AMT4PAY_AMT5PAY_AMT6defaultLabelScore
0500002214800000048572.045067.046492.047368.07988.08011.02028.02453.02329.0431.0300.0500.0000.1591
12000002114022222280468.082874.084900.085758.087003.089112.04200.04100.03000.03400.03500.00.0110.7779
2500002314412324313112.014679.015143.016892.016341.015798.02100.01000.02300.00.00.00.0110.6478
3600002213122-100063201.056600.054952.032094.031232.030384.01132.060994.01436.01047.01056.01053.0110.5038
412000023232-10000066551.067876.069903.071446.079589.081354.02429.03120.03300.010000.03200.03200.0000.1394
.................................................................................
1195800001223422222272557.077708.079384.077519.082607.081158.07000.03500.00.07000.00.04000.0110.7523
119615000013243-1-1-1-1001683.01828.03502.08979.05190.00.01837.03526.08998.0129.00.00.0000.1499
11973000012237432-1003565.03356.02758.020878.020582.019357.00.00.022000.04200.02000.03100.0100.4876
119880000131411-1000-1-1645.078379.076304.052774.011855.048944.085900.03409.01178.01926.052964.01804.0100.2613
1199500001214600000047929.048905.049764.036535.032428.015313.02078.01800.01430.01000.01000.01000.0100.1569
\n", "

1200 rows × 26 columns

\n", "
" ], "text/plain": [ " LIMIT_BAL SEX EDUCATION MARRIAGE ... PAY_AMT6 default Label Score\n", "0 50000 2 2 1 ... 500.0 0 0 0.1591\n", "1 200000 2 1 1 ... 0.0 1 1 0.7779\n", "2 50000 2 3 1 ... 0.0 1 1 0.6478\n", "3 60000 2 2 1 ... 1053.0 1 1 0.5038\n", "4 120000 2 3 2 ... 3200.0 0 0 0.1394\n", "... ... ... ... ... ... ... ... ... ...\n", "1195 80000 1 2 2 ... 4000.0 1 1 0.7523\n", "1196 150000 1 3 2 ... 0.0 0 0 0.1499\n", "1197 30000 1 2 2 ... 3100.0 1 0 0.4876\n", "1198 80000 1 3 1 ... 1804.0 1 0 0.2613\n", "1199 50000 1 2 1 ... 1000.0 1 0 0.1569\n", "\n", "[1200 rows x 26 columns]" ] }, "metadata": { "tags": [] }, "execution_count": 23 } ] }, { "cell_type": "code", "metadata": { "id": "2CRqugcz2h5a", "colab_type": "code", "colab": {} }, "source": [ "" ], "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "0ZxYxszDBqJh", "colab_type": "text" }, "source": [ "# 13.0 Deploy Model on Google Cloud" ] }, { "cell_type": "markdown", "metadata": { "id": "N5qy_gsfB1rA", "colab_type": "text" }, "source": [ "After the model is finalised and you are happy with the model, you can deploy the model on your cloud of choice. In this section, we deploy the model on the google cloud platform. " ] }, { "cell_type": "code", "metadata": { "id": "2eJdBC3EClnW", "colab_type": "code", "colab": {} }, "source": [ "from google.colab import auth\n", "auth.authenticate_user()" ], "execution_count": 24, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "9L31JPblEPG6", "colab_type": "code", "colab": {} }, "source": [ "! pip install awscli" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "i8xWrcliQCz1", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 35 }, "outputId": "07407b18-4de9-47d8-83c2-1bad74e255a3" }, "source": [ "# GCP project name, Change the name based on your own GCP project.\n", "CLOUD_PROJECT = 'gcpessentials-rz' # GCP project name\n", "bucket_name = 'pycaret-clf1011-test1' # bucket name for storage of your model\n", "BUCKET = 'gs://' + CLOUD_PROJECT + '-{}'.format(bucket_name)\n", "# Set the gcloud consol to $CLOUD_PROJECT Environment Variable for your Desired Project)\n", "!gcloud config set project $CLOUD_PROJECT" ], "execution_count": 25, "outputs": [ { "output_type": "stream", "text": [ "Updated property [core/project].\n" ], "name": "stdout" } ] }, { "cell_type": "code", "metadata": { "id": "fq7-Su1iQuHl", "colab_type": "code", "colab": {} }, "source": [ "authentication = {'project': CLOUD_PROJECT, 'bucket' : bucket_name}\n", "model_name = 'rf-clf'\n", "deploy_model(final_rf, model_name, authentication, platform = 'gcp')" ], "execution_count": 26, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "CN0CkUXKRAlc", "colab_type": "code", "colab": {} }, "source": [ "authentication = {'project': CLOUD_PROJECT, 'bucket' : bucket_name}\n", "model_name = 'rf-clf'\n", "model_gcp = load_model(model_name, \n", " platform = 'gcp', \n", " authentication = authentication,\n", " verbose=True)" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "bIMlREBHXTtF", "colab_type": "code", "colab": {} }, "source": [ "\n", "unseen_predictions = predict_model(model_gcp, data=data_unseen, verbose=True)" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "CFxn0KJ_ebGz", "colab_type": "code", "colab": { "base_uri": "https://localhost:8080/", "height": 439 }, "outputId": "00f63478-1f56-4180-dd51-f91b86dafb47" }, "source": [ "unseen_predictions" ], "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
LIMIT_BALSEXEDUCATIONMARRIAGEAGEPAY_1PAY_2PAY_3PAY_4PAY_5PAY_6BILL_AMT1BILL_AMT2BILL_AMT3BILL_AMT4BILL_AMT5BILL_AMT6PAY_AMT1PAY_AMT2PAY_AMT3PAY_AMT4PAY_AMT5PAY_AMT6defaultLabelScore
0500002214800000048572.045067.046492.047368.07988.08011.02028.02453.02329.0431.0300.0500.0000.1591
12000002114022222280468.082874.084900.085758.087003.089112.04200.04100.03000.03400.03500.00.0110.7779
2500002314412324313112.014679.015143.016892.016341.015798.02100.01000.02300.00.00.00.0110.6478
3600002213122-100063201.056600.054952.032094.031232.030384.01132.060994.01436.01047.01056.01053.0110.5038
412000023232-10000066551.067876.069903.071446.079589.081354.02429.03120.03300.010000.03200.03200.0000.1394
.................................................................................
1195800001223422222272557.077708.079384.077519.082607.081158.07000.03500.00.07000.00.04000.0110.7523
119615000013243-1-1-1-1001683.01828.03502.08979.05190.00.01837.03526.08998.0129.00.00.0000.1499
11973000012237432-1003565.03356.02758.020878.020582.019357.00.00.022000.04200.02000.03100.0100.4876
119880000131411-1000-1-1645.078379.076304.052774.011855.048944.085900.03409.01178.01926.052964.01804.0100.2613
1199500001214600000047929.048905.049764.036535.032428.015313.02078.01800.01430.01000.01000.01000.0100.1569
\n", "

1200 rows × 26 columns

\n", "
" ], "text/plain": [ " LIMIT_BAL SEX EDUCATION MARRIAGE ... PAY_AMT6 default Label Score\n", "0 50000 2 2 1 ... 500.0 0 0 0.1591\n", "1 200000 2 1 1 ... 0.0 1 1 0.7779\n", "2 50000 2 3 1 ... 0.0 1 1 0.6478\n", "3 60000 2 2 1 ... 1053.0 1 1 0.5038\n", "4 120000 2 3 2 ... 3200.0 0 0 0.1394\n", "... ... ... ... ... ... ... ... ... ...\n", "1195 80000 1 2 2 ... 4000.0 1 1 0.7523\n", "1196 150000 1 3 2 ... 0.0 0 0 0.1499\n", "1197 30000 1 2 2 ... 3100.0 1 0 0.4876\n", "1198 80000 1 3 1 ... 1804.0 1 0 0.2613\n", "1199 50000 1 2 1 ... 1000.0 1 0 0.1569\n", "\n", "[1200 rows x 26 columns]" ] }, "metadata": { "tags": [] }, "execution_count": 34 } ] } ] }