{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Perform an Automatic Hyperparameter Search\n", "\n", "In this tutorial, we use AutoNLU to detect all categories and the corresponding opinions of laptop reviews, similar to tutorial 04. But in this tutorial, we will show how AutoNLU can automatically search for the best hyperparameters (called automatic HPO) to produce the highest performance models." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext tensorboard\n", "\n", "!pip install xmltodict -q" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import autonlu\n", "from autonlu import AutoMl\n", "from autonlu.automl import Categorical, FloatRange, IntRange\n", "import pandas as pd\n", "import numpy as np\n", "\n", "import requests\n", "import xmltodict" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "User name/Email: admin\n", "Password: ········\n" ] } ], "source": [ "autonlu.login()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Download data and prepare a dataset\n", "We start by downloading the SemEval laptop dataset and convert the XML file into lists as needed by AutoNLU" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "def download_data():\n", " url = \"https://raw.githubusercontent.com/davidsbatista/Aspect-Based-Sentiment-Analysis/master/datasets/ABSA-SemEval2015/ABSA-15_Laptops_Train_Data.xml\"\n", " response = requests.get(url)\n", " data = xmltodict.parse(response.content)\n", " return data" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "def parse_data(data):\n", " X, Y = [], []\n", "\n", " for review in data[\"Reviews\"][\"Review\"]:\n", " sentences = review[\"sentences\"][\"sentence\"]\n", " sentences = [sentences] if \"text\" in sentences else sentences\n", "\n", " for entry in sentences:\n", " text = entry[\"text\"]\n", " \n", " aspects = []\n", " if \"Opinions\" in entry:\n", " aspect_list = entry[\"Opinions\"][\"Opinion\"]\n", " aspect_list = [aspect_list] if \"@category\" in aspect_list else aspect_list\n", " for aspect in aspect_list:\n", " category = aspect[\"@category\"]\n", " sentiment = aspect[\"@polarity\"]\n", " aspects.append([category, sentiment])\n", " \n", " X.append(text)\n", " Y.append(aspects)\n", " return X, Y" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This computer is really fast and I'm shocked as to how easy it is to get used to...\n", "[['LAPTOP#OPERATION_PERFORMANCE', 'positive'], ['LAPTOP#USABILITY', 'positive']]\n" ] } ], "source": [ "data = download_data()\n", "X, Y = parse_data(data)\n", "\n", "print(X[5])\n", "print(Y[5])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Searching for the best model\n", "\n", "Now we want to find the best model over a certain set of options.\n", "\n", "We specify that the model to be used should be `roberta-base`, `bert-base-uncased` and `albert-base-v2` in their OMI variant. In addition, we specify that we want to search for a good learning rate in a range of 1e-6 to 1e-3.\n", "\n", "We use the `model_arguments` to set the `standard_label` to `\"NONE\"` (something we would usually specify in the constructor of the `Model` class).\n", "\n", "Since we want to speed up the search for this tutorial, we will see how far we can get by using only 1000 optimization steps. Therefore, we deactivate early stopping and set `nb_opti_steps` to 1000 (both options that we would usually give as arguments to the `.train` method of `Model`)\n", "\n", "Then we load the dataset and start a hyperparameter optimization for 10 minutes" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\u001b[32m[I 2022-02-14 14:08:46,424]\u001b[0m A new study created in memory with name: tutorial_09\u001b[0m\n", "/home/paethon/git/py39env/lib/python3.9/site-packages/optuna/progress_bar.py:47: ExperimentalWarning: Progress bar is experimental (supported from v1.2.0). The interface can change in the future.\n", " self._init_valid()\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d55f37bf047546ef9b5c6c1cd688ca9c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "0it [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/home/paethon/git/py39env/lib/python3.9/site-packages/sklearn/metrics/_classification.py:1248: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, msg_start, len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[32m[I 2022-02-14 14:10:20,007]\u001b[0m Trial 0 finished with value: 0.9897828863346104 and parameters: {'model_folder': 'bert-base-uncased#omi', 'learning_rate': 6.251373574521755e-05}. Best is trial 0 with value: 0.9897828863346104.\u001b[0m\n", "\u001b[32m[I 2022-02-14 14:11:56,406]\u001b[0m Trial 1 finished with value: 0.9928338299985809 and parameters: {'model_folder': 'roberta-base#omi', 'learning_rate': 0.0003967605077052988}. Best is trial 1 with value: 0.9928338299985809.\u001b[0m\n", "\u001b[32m[I 2022-02-14 14:13:31,678]\u001b[0m Trial 2 finished with value: 0.9908471690080886 and parameters: {'model_folder': 'bert-base-uncased#omi', 'learning_rate': 0.0008123245085588687}. Best is trial 1 with value: 0.9928338299985809.\u001b[0m\n", "\u001b[32m[I 2022-02-14 14:13:49,994]\u001b[0m Trial 3 pruned. \u001b[0m\n", "\u001b[32m[I 2022-02-14 14:14:08,367]\u001b[0m Trial 4 pruned. \u001b[0m\n", "\u001b[32m[I 2022-02-14 14:14:26,246]\u001b[0m Trial 5 pruned. \u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/paethon/git/py39env/lib/python3.9/site-packages/sklearn/metrics/_classification.py:1248: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, msg_start, len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\u001b[32m[I 2022-02-14 14:16:00,167]\u001b[0m Trial 6 finished with value: 0.9891443167305236 and parameters: {'model_folder': 'bert-base-uncased#omi', 'learning_rate': 3.489018845491386e-05}. Best is trial 1 with value: 0.9928338299985809.\u001b[0m\n", "\u001b[32m[I 2022-02-14 14:16:18,216]\u001b[0m Trial 7 pruned. \u001b[0m\n", "\u001b[32m[I 2022-02-14 14:17:47,187]\u001b[0m Trial 8 finished with value: 0.9907762168298567 and parameters: {'model_folder': 'albert-base-v2#omi', 'learning_rate': 0.0002661901888489054}. Best is trial 1 with value: 0.9928338299985809.\u001b[0m\n", "\u001b[32m[I 2022-02-14 14:18:01,725]\u001b[0m Trial 9 pruned. \u001b[0m\n", "\u001b[32m[I 2022-02-14 14:18:16,152]\u001b[0m Trial 10 pruned. \u001b[0m\n", "\u001b[32m[I 2022-02-14 14:18:35,808]\u001b[0m Trial 11 pruned. \u001b[0m\n", "\u001b[32m[I 2022-02-14 14:18:51,469]\u001b[0m Trial 12 pruned. \u001b[0m\n", "Study statistics: \n", " Number of finished trials: 13\n", " Number of pruned trials: 8\n", " Number of complete trials: 5\n", "Best trial:\n", " Value: 0.9928338299985809\n", " Params: \n", " model_folder: roberta-base#omi\n", " learning_rate: 0.0003967605077052988\n" ] } ], "source": [ "automl = AutoMl(\"tutorial_09\",\n", " hyperparameters=[\n", " Categorical(\"model_folder\", choices=[\"roberta-base#omi\", \"bert-base-uncased#omi\", \"albert-base-v2#omi\"]),\n", " FloatRange(\"learning_rate\", low=1e-6, high=1e-3, log=True)\n", " ],\n", " model_arguments={\"standard_label\": \"NONE\"},\n", " train_arguments={\n", " \"do_early_stopping\": False,\n", " \"nb_opti_steps\": 1000\n", " })\n", "automl.load_dataset(X, Y)\n", "model = automl.create(timeout=10*60, verbose=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`model` now contains the best model we could find, and you can also see the hyperparameters that were used to train this model. So let's test the model qualitatively with a few samples:" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The device is great! - [['LAPTOP#GENERAL', 'positive']]\n", "\n", "The battery live is bad, but they wont replace it! - [['BATTERY#OPERATION_PERFORMANCE', 'negative'], ['BATTERY#QUALITY', 'negative'], ['SUPPORT#QUALITY', 'negative']]\n", "\n", "Wow, this laptop has an incredible long battery life and blazing speed. - [['BATTERY#OPERATION_PERFORMANCE', 'positive'], ['LAPTOP#OPERATION_PERFORMANCE', 'positive']]\n", "\n" ] } ], "source": [ "questions = [\n", " \"The device is great!\",\n", " \"The battery live is bad, but they wont replace it!\",\n", " \"Wow, this laptop has an incredible long battery life and blazing speed.\"\n", "]\n", "\n", "tags = model.predict(questions)\n", "\n", "for i, q in enumerate(questions):\n", " print(f\"{q} - {tags[i]}\\n\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Seems like even with only 1000 optimization steps the trained model is doing really well!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Optuna\n", "\n", "Internally, AutoNLU uses https://optuna.org/ with custom designed pruners. The attribute `.study` contains an Optuna study and can for example be used to visualize the hyperparameter search [See here for a tutorial](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/005_visualization.html#sphx-glr-tutorial-10-key-features-005-visualization-py)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "import optuna" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "mode": "markers", "name": "Objective Value", "type": "scatter", "x": [ 0, 1, 2, 6, 8 ], "y": [ 0.9897828863346104, 0.9928338299985809, 0.9908471690080886, 0.9891443167305236, 0.9907762168298567 ] }, { "name": "Best Value", "type": "scatter", "x": [ 0, 1, 2, 6, 8 ], "y": [ 0.9897828863346104, 0.9928338299985809, 0.9928338299985809, 0.9928338299985809, 0.9928338299985809 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Optimization History Plot" }, "xaxis": { "title": { "text": "#Trials" } }, "yaxis": { "title": { "text": "Objective Value" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "optuna.visualization.plot_optimization_history(automl.study)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial1", "type": "scatter", "x": [ 0, 640, 1280, 2237, 3322, 4506, 5655, 6836, 7985, 9137, 10254, 11435, 12648, 13864, 15778, 17439, 19004, 20473, 21817, 23094, 24371, 25680, 26925, 28141, 29322, 30503, 31684 ], "y": [ 0.987583339214325, 0.987583339214325, 0.9879381060600281, 0.9882219433784485, 0.988718569278717, 0.9902085661888123, 0.9905633330345154, 0.9907761812210083, 0.9907052516937256, 0.9924080967903137, 0.9912728667259216, 0.992337167263031, 0.9920533299446106, 0.9922661781311035, 0.9924080967903137, 0.9928337931632996, 0.9921952486038208, 0.9924080967903137, 0.9926919341087341, 0.9928337931632996, 0.992904782295227, 0.9926919341087341, 0.9927628636360168, 0.992904782295227, 0.9926919341087341, 0.9929757118225098, 0.9927628636360168 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial2", "type": "scatter", "x": [ 0, 608, 1216, 2141, 3290, 4506, 5687, 6996, 8209, 9422, 10638, 11915, 13192, 14437, 15746, 17727, 19484, 21113, 22646, 24051, 25424, 26797, 28045, 29322, 30567, 31844 ], "y": [ 0.9877252578735352, 0.9880800247192383, 0.9880090951919556, 0.988150954246521, 0.9888604879379272, 0.9898537993431091, 0.9903504848480225, 0.9905633330345154, 0.9909180998802185, 0.9904214143753052, 0.9904924035072327, 0.9912728667259216, 0.9907761812210083, 0.9906343221664429, 0.9906343221664429, 0.9909180998802185, 0.9909180998802185, 0.9907761812210083, 0.990989089012146, 0.9907052516937256, 0.9907761812210083, 0.9907761812210083, 0.9907761812210083, 0.9906343221664429, 0.9907761812210083, 0.9907052516937256 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial3", "type": "scatter", "x": [ 0 ], "y": [ 0.987583339214325 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial4", "type": "scatter", "x": [ 0 ], "y": [ 0.9877252578735352 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial5", "type": "scatter", "x": [ 0 ], "y": [ 0.987583339214325 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial6", "type": "scatter", "x": [ 0, 640, 1280, 2205, 3386, 4634, 5847, 7092, 8369, 9614, 10862, 12075, 13352, 14661, 15938, 17983, 19836, 21529, 23062, 24595, 26000, 27341, 28682, 29991, 31332 ], "y": [ 0.9876543283462524, 0.987583339214325, 0.987583339214325, 0.9876543283462524, 0.9877252578735352, 0.9877961874008179, 0.9880800247192383, 0.9880090951919556, 0.9879381060600281, 0.9880800247192383, 0.9880800247192383, 0.9880800247192383, 0.9880090951919556, 0.9880800247192383, 0.9882928729057312, 0.9885767102241516, 0.9884347915649414, 0.9886476397514343, 0.988718569278717, 0.9888604879379272, 0.9889314770698547, 0.9889314770698547, 0.9890733361244202, 0.9890733361244202, 0.9890733361244202 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial7", "type": "scatter", "x": [ 0 ], "y": [ 0.9877252578735352 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial8", "type": "scatter", "x": [ 0, 608, 1472, 3162, 4951, 6772, 8753, 10670, 12552, 14533, 16482, 18527, 20537, 22550, 25552, 28077, 30503 ], "y": [ 0.9876543283462524, 0.9876543283462524, 0.9879381060600281, 0.9882928729057312, 0.9887895584106445, 0.9894990921020508, 0.9897119402885437, 0.9905633330345154, 0.9909180998802185, 0.9912728667259216, 0.9912728667259216, 0.9907052516937256, 0.9911309480667114, 0.9911309480667114, 0.9911309480667114, 0.990989089012146, 0.9909180998802185 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial9", "type": "scatter", "x": [ 0 ], "y": [ 0.987583339214325 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial10", "type": "scatter", "x": [ 0 ], "y": [ 0.987583339214325 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial11", "type": "scatter", "x": [ 0, 576, 1216 ], "y": [ 0.9877961874008179, 0.9877961874008179, 0.9879381060600281 ] }, { "marker": { "maxdisplayed": 10 }, "mode": "lines+markers", "name": "Trial12", "type": "scatter", "x": [ 0 ], "y": [ 0.987583339214325 ] } ], "layout": { "showlegend": false, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Intermediate Values Plot" }, "xaxis": { "title": { "text": "Step" } }, "yaxis": { "title": { "text": "Intermediate Value" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "optuna.visualization.plot_intermediate_values(automl.study)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "colorbar": { "title": { "text": "Objective Value" } }, "colorscale": [ [ 0, "rgb(5,10,172)" ], [ 0.35, "rgb(40,60,190)" ], [ 0.5, "rgb(70,100,245)" ], [ 0.6, "rgb(90,120,245)" ], [ 0.7, "rgb(106,137,247)" ], [ 1, "rgb(220,220,220)" ] ], "connectgaps": true, "contours": { "coloring": "heatmap" }, "hoverinfo": "none", "line": { "smoothing": 1.3 }, "reversescale": false, "type": "contour", "x": [ 0.000029809315470542778, 0.00003489018845491386, 0.00006251373574521755, 0.0002661901888489054, 0.0003967605077052988, 0.0008123245085588687, 0.0009507818191320628 ], "y": [ "albert-base-v2#omi", "bert-base-uncased#omi", "roberta-base#omi" ], "z": [ [ null, null, null, 0.9907762168298567, null, null, null ], [ null, 0.9891443167305236, 0.9897828863346104, null, null, 0.9908471690080886, null ], [ null, null, null, null, 0.9928338299985809, null, null ] ] }, { "marker": { "color": "black", "line": { "color": "Grey", "width": 0.5 } }, "mode": "markers", "showlegend": false, "type": "scatter", "x": [ 0.00006251373574521755, 0.0003967605077052988, 0.0008123245085588687, 0.00003489018845491386, 0.0002661901888489054 ], "y": [ "bert-base-uncased#omi", "roberta-base#omi", "bert-base-uncased#omi", "bert-base-uncased#omi", "albert-base-v2#omi" ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Contour Plot" }, "xaxis": { "range": [ -4.525647996821423, -3.0219191314517593 ], "title": { "text": "learning_rate" }, "type": "log" }, "yaxis": { "range": [ -0.1, 2.1 ], "title": { "text": "model_folder" }, "type": "category" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "optuna.visualization.plot_contour(automl.study)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "@webio": { "lastCommId": null, "lastKernelId": null }, "interpreter": { "hash": "febd818df5a637a53a418fc0eb61b384a0c7bd4ae302a25003cc931f9e9d1769" }, "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.9.10" } }, "nbformat": 4, "nbformat_minor": 2 }