{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example: Multi-metric runs\n", "----------------------------\n", "\n", "This example shows how to evaluate an atom's pipeline on multiple metrics.\n", "\n", "Import the breast cancer dataset from [sklearn.datasets](https://scikit-learn.org/stable/datasets/index.html#wine-dataset). This is a small and easy to train dataset whose goal is to predict whether a patient has breast cancer or not." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load the data" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Import packages\n", "import pandas as pd\n", "from atom import ATOMRegressor" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
SexLengthDiameterHeightWhole weightShucked weightViscera weightShell weightRings
0M0.4550.3650.0950.51400.22450.10100.15015
1M0.3500.2650.0900.22550.09950.04850.0707
2F0.5300.4200.1350.67700.25650.14150.2109
3M0.4400.3650.1250.51600.21550.11400.15510
4I0.3300.2550.0800.20500.08950.03950.0557
\n", "
" ], "text/plain": [ " Sex Length Diameter Height Whole weight Shucked weight Viscera weight \\\n", "0 M 0.455 0.365 0.095 0.5140 0.2245 0.1010 \n", "1 M 0.350 0.265 0.090 0.2255 0.0995 0.0485 \n", "2 F 0.530 0.420 0.135 0.6770 0.2565 0.1415 \n", "3 M 0.440 0.365 0.125 0.5160 0.2155 0.1140 \n", "4 I 0.330 0.255 0.080 0.2050 0.0895 0.0395 \n", "\n", " Shell weight Rings \n", "0 0.150 15 \n", "1 0.070 7 \n", "2 0.210 9 \n", "3 0.155 10 \n", "4 0.055 7 " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Load data\n", "X = pd.read_csv(\"./datasets/abalone.csv\")\n", "\n", "# Let's have a look\n", "X.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run the pipeline" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "<< ================== ATOM ================== >>\n", "Algorithm task: regression.\n", "\n", "Dataset stats ==================== >>\n", "Shape: (4177, 9)\n", "Memory: 509.72 kB\n", "Scaled: False\n", "Categorical features: 1 (12.5%)\n", "Outlier values: 189 (0.6%)\n", "-------------------------------------\n", "Train set size: 3342\n", "Test set size: 835\n", "\n" ] } ], "source": [ "atom = ATOMRegressor(X, n_jobs=1, verbose=2, random_state=1)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Fitting Encoder...\n", "Encoding categorical columns...\n", " --> OneHot-encoding feature Sex. Contains 3 classes.\n" ] } ], "source": [ "atom.encode()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Training ========================= >>\n", "Models: lSVM, hGBM\n", "Metric: r2, neg_root_mean_squared_error\n", "\n", "\n", "Running hyperparameter tuning for LinearSVM...\n", "| trial | loss | C | dual | r2 | best_r2 | neg_root_mean_squared_error | best_neg_root_mean_squared_error | time_trial | time_ht | state |\n", "| ----- | ----------------------- | ------- | ------- | ------- | ------- | --------------------------- | -------------------------------- | ---------- | ------- | -------- |\n", "| 0 | squared_epsilon_insen.. | 0.001 | True | 0.2887 | 0.2887 | -2.6528 | -2.6528 | 0.043s | 0.043s | COMPLETE |\n", "| 1 | squared_epsilon_insen.. | 0.0534 | False | 0.3862 | 0.3862 | -2.5926 | -2.5926 | 0.057s | 0.100s | COMPLETE |\n", "| 2 | squared_epsilon_insen.. | 0.0105 | True | 0.433 | 0.433 | -2.4084 | -2.4084 | 0.048s | 0.148s | COMPLETE |\n", "| 3 | epsilon_insensitive | 0.6215 | True | 0.4022 | 0.433 | -2.5251 | -2.4084 | 0.046s | 0.194s | COMPLETE |\n", "| 4 | squared_epsilon_insen.. | 0.0369 | False | 0.4057 | 0.433 | -2.5477 | -2.4084 | 0.039s | 0.233s | COMPLETE |\n", "| 5 | epsilon_insensitive | 0.0016 | True | -1.5344 | 0.433 | -5.0102 | -2.4084 | 0.039s | 0.272s | COMPLETE |\n", "| 6 | squared_epsilon_insen.. | 61.5811 | False | 0.4354 | 0.4354 | -2.3845 | -2.3845 | 0.040s | 0.312s | COMPLETE |\n", "| 7 | squared_epsilon_insen.. | 14.898 | False | 0.4925 | 0.4925 | -2.2628 | -2.2628 | 0.044s | 0.356s | COMPLETE |\n", "| 8 | epsilon_insensitive | 0.0252 | True | 0.3695 | 0.4925 | -2.6178 | -2.2628 | 0.039s | 0.395s | COMPLETE |\n", "| 9 | squared_epsilon_insen.. | 0.0294 | True | 0.4767 | 0.4925 | -2.3896 | -2.2628 | 0.050s | 0.445s | COMPLETE |\n", "Hyperparameter tuning ---------------------------\n", "Best trial --> 7\n", "Best parameters:\n", " --> loss: squared_epsilon_insensitive\n", " --> C: 14.898\n", " --> dual: False\n", "Best evaluation --> r2: 0.4925 neg_root_mean_squared_error: -2.2628\n", "Time elapsed: 0.445s\n", "Fit ---------------------------------------------\n", "Train evaluation --> r2: 0.4592 neg_root_mean_squared_error: -2.3795\n", "Test evaluation --> r2: 0.4584 neg_root_mean_squared_error: -2.3369\n", "Time elapsed: 0.027s\n", "Bootstrap ---------------------------------------\n", "Evaluation --> r2: 0.4577 ± 0.002 neg_root_mean_squared_error: -2.3384 ± 0.0043\n", "Time elapsed: 0.107s\n", "-------------------------------------------------\n", "Total time: 0.580s\n", "\n", "\n", "Running hyperparameter tuning for HistGradientBoosting...\n", "| trial | loss | learning_rate | max_iter | max_leaf_nodes | max_depth | min_samples_leaf | l2_regularization | r2 | best_r2 | neg_root_mean_squared_error | best_neg_root_mean_squared_error | time_trial | time_ht | state |\n", "| ----- | ----------- | ------------- | -------- | -------------- | --------- | ---------------- | ----------------- | ------- | ------- | --------------------------- | -------------------------------- | ---------- | ------- | -------- |\n", "| 0 | absolute_.. | 0.0402 | 80 | 13 | 15 | 24 | 0.9 | 0.5248 | 0.5248 | -2.1683 | -2.1683 | 0.277s | 0.277s | COMPLETE |\n", "| 1 | squared_e.. | 0.0219 | 440 | 14 | 9 | 16 | 0.1 | 0.5673 | 0.5673 | -2.1767 | -2.1683 | 1.106s | 1.383s | COMPLETE |\n", "| 2 | absolute_.. | 0.034 | 250 | 12 | 12 | 26 | 0.4 | 0.5174 | 0.5673 | -2.2218 | -2.1683 | 0.864s | 2.247s | COMPLETE |\n", "| 3 | absolute_.. | 0.3174 | 370 | 46 | 6 | 10 | 0.6 | 0.5566 | 0.5673 | -2.1746 | -2.1683 | 1.385s | 3.632s | COMPLETE |\n", "| 4 | poisson | 0.0518 | 460 | 35 | 3 | 15 | 0.9 | 0.5691 | 0.5691 | -2.1695 | -2.1683 | 0.593s | 4.225s | COMPLETE |\n", "| 5 | poisson | 0.0177 | 140 | 34 | None | 21 | 0.0 | 0.5546 | 0.5691 | -2.1003 | -2.1003 | 0.818s | 5.043s | COMPLETE |\n", "| 6 | absolute_.. | 0.0255 | 130 | 40 | 15 | 17 | 0.6 | 0.483 | 0.5691 | -2.2817 | -2.1003 | 1.093s | 6.136s | COMPLETE |\n", "| 7 | squared_e.. | 0.0136 | 190 | 35 | 14 | 22 | 1.0 | 0.5699 | 0.5699 | -2.083 | -2.083 | 1.003s | 7.138s | COMPLETE |\n", "| 8 | squared_e.. | 0.1919 | 200 | 29 | 5 | 26 | 0.3 | 0.5105 | 0.5699 | -2.3066 | -2.083 | 0.388s | 7.527s | COMPLETE |\n", "| 9 | squared_e.. | 0.4892 | 460 | 28 | 10 | 24 | 1.0 | 0.4298 | 0.5699 | -2.4942 | -2.083 | 1.438s | 8.965s | COMPLETE |\n", "Hyperparameter tuning ---------------------------\n", "Best trial --> 7\n", "Best parameters:\n", " --> loss: squared_error\n", " --> learning_rate: 0.0136\n", " --> max_iter: 190\n", " --> max_leaf_nodes: 35\n", " --> max_depth: 14\n", " --> min_samples_leaf: 22\n", " --> l2_regularization: 1.0\n", "Best evaluation --> r2: 0.5699 neg_root_mean_squared_error: -2.083\n", "Time elapsed: 8.965s\n", "Fit ---------------------------------------------\n", "Train evaluation --> r2: 0.6668 neg_root_mean_squared_error: -1.8677\n", "Test evaluation --> r2: 0.5583 neg_root_mean_squared_error: -2.1105\n", "Time elapsed: 1.059s\n", "Bootstrap ---------------------------------------\n", "Evaluation --> r2: 0.5388 ± 0.0083 neg_root_mean_squared_error: -2.1565 ± 0.0192\n", "Time elapsed: 5.925s\n", "-------------------------------------------------\n", "Total time: 15.949s\n", "\n", "\n", "Final results ==================== >>\n", "Total time: 16.714s\n", "-------------------------------------\n", "LinearSVM --> r2: 0.4577 ± 0.002 neg_root_mean_squared_error: -2.3384 ± 0.0043\n", "HistGradientBoosting --> r2: 0.5388 ± 0.0083 neg_root_mean_squared_error: -2.1565 ± 0.0192 !\n" ] } ], "source": [ "# For every step of the BO, both metrics are calculated,\n", "# but only the first is used for optimization!\n", "atom.run(\n", " models=[\"lsvm\", \"hGBM\"],\n", " metric=(\"r2\", \"rmse\"),\n", " n_trials=10,\n", " n_bootstrap=6,\n", ")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Applying cross-validation...\n" ] }, { "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", "
train_r2test_r2train_neg_root_mean_squared_errortest_neg_root_mean_squared_errortime (s)
00.6724820.534480-1.841417-2.2148801.074976
10.6696930.541603-1.850140-2.1933591.078980
20.6746500.525120-1.860947-2.1112041.142037
30.6615190.579041-1.851866-2.1942391.110008
40.6668290.558253-1.867706-2.1105241.085987
mean0.6690350.547699-1.854415-2.1648411.098398
std0.0045870.0190550.0090890.0447410.024975
\n", "
" ], "text/plain": [ " train_r2 test_r2 train_neg_root_mean_squared_error \\\n", "0 0.672482 0.534480 -1.841417 \n", "1 0.669693 0.541603 -1.850140 \n", "2 0.674650 0.525120 -1.860947 \n", "3 0.661519 0.579041 -1.851866 \n", "4 0.666829 0.558253 -1.867706 \n", "mean 0.669035 0.547699 -1.854415 \n", "std 0.004587 0.019055 0.009089 \n", "\n", " test_neg_root_mean_squared_error time (s) \n", "0 -2.214880 1.074976 \n", "1 -2.193359 1.078980 \n", "2 -2.111204 1.142037 \n", "3 -2.194239 1.110008 \n", "4 -2.110524 1.085987 \n", "mean -2.164841 1.098398 \n", "std 0.044741 0.024975 " ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Check the robustness of the pipeline using cross-validation\n", "atom.winner.cross_validate()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Analyze the results" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
score_htscore_trainscore_test
lSVM[0.4925303455788521, -2.262753922393612][0.4592, -2.3795][0.4584, -2.3369]
hGBM[0.5699377046439738, -2.08304173753828][0.6668, -1.8677][0.5583, -2.1105]
\n", "
" ], "text/plain": [ " score_ht score_train \\\n", "lSVM [0.4925303455788521, -2.262753922393612] [0.4592, -2.3795] \n", "hGBM [0.5699377046439738, -2.08304173753828] [0.6668, -1.8677] \n", "\n", " score_test \n", "lSVM [0.4584, -2.3369] \n", "hGBM [0.5583, -2.1105] " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# The columns in the results dataframe contain a list of\n", "# scores, one for each metric (in the same order as called)\n", "atom.results[[\"score_ht\", \"score_train\", \"score_test\"]]" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "legendgroup": "lSVM", "legendgrouptitle": { "font": { "size": 16 }, "text": "lSVM" }, "line": { "color": "rgb(0, 98, 98)", "width": 2 }, "marker": { "color": "rgb(0, 98, 98)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": [ 8, 8, 8, 8, 8, 8, 8, 12, 8, 8 ], "symbol": [ "circle", "circle", "circle", "circle", "circle", "circle", "circle", "star", "circle", "circle" ] }, "mode": "lines+markers", "name": "r2", "showlegend": true, "type": "scatter", "x": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x2", "y": [ 0.28873632968867413, 0.38618502821310496, 0.432972702836662, 0.4021724449668481, 0.40574506271683086, -1.534383966493194, 0.4353899817981043, 0.4925303455788521, 0.3695277003837695, 0.4766691395610483 ], "yaxis": "y" }, { "hovertemplate": "(%{x}, %{y})lSVM - r2", "legendgroup": "lSVM", "legendgrouptitle": { "font": { "size": 16 }, "text": "lSVM" }, "line": { "color": "rgb(0, 98, 98)", "width": 2 }, "marker": { "color": "rgb(0, 98, 98)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines+markers", "name": "r2", "showlegend": false, "type": "scatter", "x": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x2", "y": [ 0.09744869852443083, 0.04678767462355704, 0.030800257869813885, 0.0035726177499827427, 1.9401290292100248, 1.9697739482912984, 0.05714036378074783, 0.12300264519508264, 0.10714143917727881 ], "yaxis": "y2" }, { "legendgroup": "hGBM", "legendgrouptitle": { "font": { "size": 16 }, "text": "hGBM" }, "line": { "color": "rgb(56, 166, 165)", "width": 2 }, "marker": { "color": "rgb(56, 166, 165)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": [ 8, 8, 8, 8, 8, 8, 8, 12, 8, 8 ], "symbol": [ "circle", "circle", "circle", "circle", "circle", "circle", "circle", "star", "circle", "circle" ] }, "mode": "lines+markers", "name": "r2", "showlegend": true, "type": "scatter", "x": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x2", "y": [ 0.5248331781628925, 0.5673076676519454, 0.5174332065928562, 0.556623086089254, 0.5690755328309456, 0.554619592198545, 0.48301498909837426, 0.5699377046439738, 0.5105180731028227, 0.42983731119440205 ], "yaxis": "y" }, { "hovertemplate": "(%{x}, %{y})hGBM - r2", "legendgroup": "hGBM", "legendgrouptitle": { "font": { "size": 16 }, "text": "hGBM" }, "line": { "color": "rgb(56, 166, 165)", "width": 2 }, "marker": { "color": "rgb(56, 166, 165)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines+markers", "name": "r2", "showlegend": false, "type": "scatter", "x": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x2", "y": [ 0.04247448948905286, 0.049874461059089215, 0.03918987949639785, 0.012452446741691547, 0.014455940632400632, 0.0716046031001707, 0.0869227155455995, 0.05941963154115104, 0.08068076190842066 ], "yaxis": "y2" }, { "legendgroup": "lSVM", "legendgrouptitle": { "font": { "size": 16 }, "text": "lSVM" }, "line": { "color": "rgb(0, 98, 98)", "dash": "dashdot", "width": 2 }, "marker": { "color": "rgb(0, 98, 98)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": [ 8, 8, 8, 8, 8, 8, 8, 12, 8, 8 ], "symbol": [ "circle", "circle", "circle", "circle", "circle", "circle", "circle", "star", "circle", "circle" ] }, "mode": "lines+markers", "name": "neg_root_mean_squared_error", "showlegend": true, "type": "scatter", "x": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x4", "y": [ -2.652832750951567, -2.5926015099951765, -2.4083996657900633, -2.525147605339932, -2.547687907299415, -5.0101759500263086, -2.3844964091771974, -2.262753922393612, -2.6178084479643786, -2.3896144120353857 ], "yaxis": "y3" }, { "hovertemplate": "(%{x}, %{y})lSVM - neg_root_mean_squared_error", "legendgroup": "lSVM", "legendgrouptitle": { "font": { "size": 16 }, "text": "lSVM" }, "line": { "color": "rgb(0, 98, 98)", "dash": "dashdot", "width": 2 }, "marker": { "color": "rgb(0, 98, 98)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines+markers", "name": "neg_root_mean_squared_error", "showlegend": false, "type": "scatter", "x": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x4", "y": [ 0.06023124095639032, 0.1842018442051132, 0.11674793954986873, 0.022540301959482978, 2.4624880427268936, 2.625679540849111, 0.12174248678358524, 0.35505452557076644, 0.2281940359289929 ], "yaxis": "y4" }, { "legendgroup": "hGBM", "legendgrouptitle": { "font": { "size": 16 }, "text": "hGBM" }, "line": { "color": "rgb(56, 166, 165)", "dash": "dashdot", "width": 2 }, "marker": { "color": "rgb(56, 166, 165)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": [ 8, 8, 8, 8, 8, 8, 8, 12, 8, 8 ], "symbol": [ "circle", "circle", "circle", "circle", "circle", "circle", "circle", "star", "circle", "circle" ] }, "mode": "lines+markers", "name": "neg_root_mean_squared_error", "showlegend": true, "type": "scatter", "x": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x4", "y": [ -2.168291222161106, -2.176740364100097, -2.2218016849742384, -2.174629841057031, -2.169503739250525, -2.100304805374684, -2.281714796242354, -2.08304173753828, -2.3066047938741767, -2.4942446712326203 ], "yaxis": "y3" }, { "hovertemplate": "(%{x}, %{y})hGBM - neg_root_mean_squared_error", "legendgroup": "hGBM", "legendgrouptitle": { "font": { "size": 16 }, "text": "hGBM" }, "line": { "color": "rgb(56, 166, 165)", "dash": "dashdot", "width": 2 }, "marker": { "color": "rgb(56, 166, 165)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines+markers", "name": "neg_root_mean_squared_error", "showlegend": false, "type": "scatter", "x": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "xaxis": "x4", "y": [ 0.008449141938990934, 0.0450613208741415, 0.0471718439172073, 0.005126101806506078, 0.0691989338758412, 0.18140999086767007, 0.19867305870407392, 0.2235630563358968, 0.18763987735844356 ], "yaxis": "y4" } ], "layout": { "annotations": [ { "font": { "size": 20 }, "showarrow": false, "text": "Hyperparameter tuning performance for R2", "x": 0.225, "xanchor": "center", "xref": "paper", "y": 1.005, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 20 }, "showarrow": false, "text": "Hyperparameter tuning performance for RMSE", "x": 0.775, "xanchor": "center", "xref": "paper", "y": 1.005, "yanchor": "bottom", "yref": "paper" } ], "font": { "size": 12 }, "height": 600, "hoverlabel": { "font": { "size": 16 } }, "hovermode": "x unified", "legend": { "bgcolor": "rgba(255, 255, 255, 0.5)", "font": { "size": 16 }, "groupclick": "togglegroup", "traceorder": "grouped" }, "margin": { "b": 50, "l": 50, "pad": 0, "r": 0, "t": 59 }, "showlegend": true, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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": { "font": { "size": 24 }, "pad": { "b": 15, "t": 15 }, "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "top" }, "width": 1250, "xaxis": { "anchor": "y", "automargin": true, "domain": [ 0, 0.45 ], "showticklabels": false, "title": { "font": { "size": 16 } } }, "xaxis2": { "anchor": "y2", "automargin": true, "autorange": true, "domain": [ 0, 0.45 ], "range": [ -0.6448498631168794, 9.64484986311688 ], "title": { "font": { "size": 16 }, "text": "Trial" }, "type": "linear" }, "xaxis3": { "anchor": "y3", "automargin": true, "domain": [ 0.55, 1 ], "showticklabels": false, "title": { "font": { "size": 16 } } }, "xaxis4": { "anchor": "y4", "automargin": true, "autorange": true, "domain": [ 0.55, 1 ], "range": [ -0.6448498631168795, 9.64484986311688 ], "title": { "font": { "size": 16 }, "text": "Trial" }, "type": "linear" }, "yaxis": { "anchor": "x", "automargin": true, "autorange": true, "domain": [ 0.31, 1 ], "range": [ -1.6922705210479607, 0.745815388731634 ], "title": { "font": { "size": 16 }, "text": "Score" }, "type": "linear" }, "yaxis2": { "anchor": "x2", "automargin": true, "autorange": true, "domain": [ 0, 0.29 ], "range": [ -0.19811316591241088, 2.171459731953692 ], "title": { "font": { "size": 16 }, "text": "d" }, "type": "linear" }, "yaxis3": { "anchor": "x3", "automargin": true, "autorange": true, "domain": [ 0.31, 1 ], "range": [ -5.229797855682666, -1.8383939760446932 ], "title": { "font": { "size": 16 }, "text": "Score" }, "type": "linear" }, "yaxis4": { "anchor": "x4", "automargin": true, "autorange": true, "domain": [ 0, 0.29 ], "range": [ -0.2636807420160333, 2.8944863846716506 ], "title": { "font": { "size": 16 }, "text": "d" }, "type": "linear" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Some plots allow us to choose the metric we want to show\n", "with atom.canvas():\n", " atom.plot_trials(metric=\"r2\", title=\"Hyperparameter tuning performance for R2\")\n", " atom.plot_trials(metric=\"rmse\", title=\"Hyperparameter tuning performance for RMSE\")" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "boxpoints": "outliers", "legendgroup": "r2", "marker": { "color": "rgb(0, 98, 98)" }, "name": "r2", "orientation": "h", "showlegend": true, "type": "box", "x": [ 0.4575562001062955, 0.458340904925999, 0.45684280677070677, 0.46113826422776416, 0.45724897839794176, 0.45516891136266535, 0.536584648360881, 0.543985237241343, 0.5383790777848179, 0.5431746768421848, 0.5468136441055751, 0.5237852578664706 ], "xaxis": "x", "y": [ "lSVM", "lSVM", "lSVM", "lSVM", "lSVM", "lSVM", "hGBM", "hGBM", "hGBM", "hGBM", "hGBM", "hGBM" ], "yaxis": "y" } ], "layout": { "bargroupgap": 0.05, "boxmode": "group", "font": { "size": 12 }, "height": 500, "hoverlabel": { "font": { "size": 16 } }, "legend": { "bgcolor": "rgba(255, 255, 255, 0.5)", "font": { "size": 16 }, "groupclick": "toggleitem", "traceorder": "grouped", "x": 0.99, "xanchor": "right", "y": 0.01, "yanchor": "bottom" }, "margin": { "b": 50, "l": 50, "pad": 0, "r": 0, "t": 35 }, "showlegend": true, "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": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "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": { "font": { "size": 24 }, "pad": { "b": 15, "t": 15 }, "x": 0.5, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "top" }, "width": 900, "xaxis": { "anchor": "y", "automargin": true, "autorange": true, "domain": [ 0, 1 ], "range": [ 0.4500775373213926, 0.5519050181468479 ], "title": { "font": { "size": 16 }, "text": "time (s)" }, "type": "linear" }, "yaxis": { "anchor": "x", "automargin": true, "autorange": true, "categoryorder": "total ascending", "domain": [ 0, 1 ], "range": [ -0.5, 1.5 ], "title": { "font": { "size": 16 } }, "type": "category" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "atom.plot_results(metric=\"r2\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.2" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }