{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example: Multilabel classification\n", "--------------------------------\n", "\n", "This example shows how to use ATOM to solve a multilabel classification problem.\n", "\n", "The data used is a synthetic dataset created using sklearn's [make_multilabel_classification](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_multilabel_classification.html) function." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load the data" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "tags": [] }, "outputs": [], "source": [ "# Import packages\n", "import pandas as pd\n", "from atom import ATOMClassifier\n", "from sklearn.datasets import make_multilabel_classification" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [] }, "outputs": [], "source": [ "# Create data\n", "X, y = make_multilabel_classification(n_samples=300, n_classes=3, random_state=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run the pipeline" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "<< ================== ATOM ================== >>\n", "Algorithm task: multilabel classification.\n", "\n", "Dataset stats ==================== >>\n", "Shape: (300, 23)\n", "Train set size: 240\n", "Test set size: 60\n", "-------------------------------------\n", "Memory: 51.73 kB\n", "Scaled: False\n", "Outlier values: 35 (0.6%)\n", "\n" ] } ], "source": [ "# Note that for multioutput tasks, you must specify the `y` keyword\n", "atom = ATOMClassifier(X, y=y, verbose=2, random_state=1)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "tags": [] }, "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
acronymmodelnative_multioutput
0AdaBAdaBoostFalse
1BagBaggingFalse
2BNBBernoulliNBFalse
3CatBCatBoostFalse
4CatNBCategoricalNBFalse
5CNBComplementNBFalse
6TreeDecisionTreeTrue
7DummyDummyFalse
8ETreeExtraTreeTrue
9ETExtraTreesTrue
10GNBGaussianNBFalse
11GPGaussianProcessFalse
12GBMGradientBoostingFalse
13hGBMHistGradientBoostingFalse
14KNNKNearestNeighborsTrue
15LGBLightGBMFalse
16LDALinearDiscriminantAnalysisFalse
17lSVMLinearSVMFalse
18LRLogisticRegressionFalse
19MLPMultiLayerPerceptronFalse
20MNBMultinomialNBFalse
21PAPassiveAggressiveFalse
22PercPerceptronFalse
23QDAQuadraticDiscriminantAnalysisFalse
24RNNRadiusNearestNeighborsTrue
25RFRandomForestTrue
26RidgeRidgeFalse
27SGDStochasticGradientDescentFalse
28SVMSupportVectorMachineFalse
29XGBXGBoostFalse
\n", "
" ], "text/plain": [ " acronym model native_multioutput\n", "0 AdaB AdaBoost False\n", "1 Bag Bagging False\n", "2 BNB BernoulliNB False\n", "3 CatB CatBoost False\n", "4 CatNB CategoricalNB False\n", "5 CNB ComplementNB False\n", "6 Tree DecisionTree True\n", "7 Dummy Dummy False\n", "8 ETree ExtraTree True\n", "9 ET ExtraTrees True\n", "10 GNB GaussianNB False\n", "11 GP GaussianProcess False\n", "12 GBM GradientBoosting False\n", "13 hGBM HistGradientBoosting False\n", "14 KNN KNearestNeighbors True\n", "15 LGB LightGBM False\n", "16 LDA LinearDiscriminantAnalysis False\n", "17 lSVM LinearSVM False\n", "18 LR LogisticRegression False\n", "19 MLP MultiLayerPerceptron False\n", "20 MNB MultinomialNB False\n", "21 PA PassiveAggressive False\n", "22 Perc Perceptron False\n", "23 QDA QuadraticDiscriminantAnalysis False\n", "24 RNN RadiusNearestNeighbors True\n", "25 RF RandomForest True\n", "26 Ridge Ridge False\n", "27 SGD StochasticGradientDescent False\n", "28 SVM SupportVectorMachine False\n", "29 XGB XGBoost False" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Show the models that natively support multilabel tasks\n", "atom.available_models()[[\"acronym\", \"model\", \"native_multioutput\"]]" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Training ========================= >>\n", "Models: LDA, RF\n", "Metric: recall_weighted\n", "\n", "\n", "Results for LinearDiscriminantAnalysis:\n", "Fit ---------------------------------------------\n", "Train evaluation --> recall_weighted: 0.8912\n", "Test evaluation --> recall_weighted: 0.899\n", "Time elapsed: 0.078s\n", "-------------------------------------------------\n", "Total time: 0.078s\n", "\n", "\n", "Results for RandomForest:\n", "Fit ---------------------------------------------\n", "Train evaluation --> recall_weighted: 1.0\n", "Test evaluation --> recall_weighted: 0.9091\n", "Time elapsed: 0.619s\n", "-------------------------------------------------\n", "Total time: 0.619s\n", "\n", "\n", "Final results ==================== >>\n", "Total time: 0.701s\n", "-------------------------------------\n", "LinearDiscriminantAnalysis --> recall_weighted: 0.899\n", "RandomForest --> recall_weighted: 0.9091 !\n" ] } ], "source": [ "atom.run(models=[\"LDA\", \"RF\"], metric=\"recall_weighted\")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Estimator for LDA is: ClassifierChain(base_estimator=LinearDiscriminantAnalysis(), random_state=1)\n", "Estimator for RF is: RandomForestClassifier(n_jobs=1, random_state=1)\n" ] } ], "source": [ "# Note that non-native multioutput models use a meta-estimator wrapper\n", "print(f\"Estimator for LDA is: {atom.lda.estimator}\")\n", "print(f\"Estimator for RF is: {atom.rf.estimator}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Some models, such as MLP, have native support for multilabel, but not for multiclass-multioutput tasks. For that reason, their `native_multioutput` tag is False, but those models don't necessarily need a multioutout meta-estimator. In such cases, use atom's `multioutput` attribute to tell atom not to use any multioutput wrapper. See [here](https://scikit-learn.org/stable/modules/multiclass.html) an overview of sklearn classifiers and which tasks they support." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "tags": [] }, "outputs": [], "source": [ "atom.multioutput = None" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Training ========================= >>\n", "Models: MLP\n", "Metric: recall_weighted\n", "\n", "\n", "Results for MultiLayerPerceptron:\n", "Fit ---------------------------------------------\n", "Train evaluation --> recall_weighted: 0.9689\n", "Test evaluation --> recall_weighted: 0.9192\n", "Time elapsed: 6.430s\n", "-------------------------------------------------\n", "Total time: 6.430s\n", "\n", "\n", "Final results ==================== >>\n", "Total time: 6.438s\n", "-------------------------------------\n", "MultiLayerPerceptron --> recall_weighted: 0.9192\n" ] } ], "source": [ "atom.run(\"MLP\")" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Estimator for MLP is: MLPClassifier(random_state=1)\n" ] } ], "source": [ "print(f\"Estimator for MLP is: {atom.mlp.estimator}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Analyze the results" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Best threshold per target column: [0.72, 0.75, 0.56]\n" ] } ], "source": [ "thresholds = atom.rf.get_best_threshold()\n", "print(f\"Best threshold per target column: {thresholds}\")" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "accuracy 0.5167\n", "average_precision 0.6607\n", "f1_weighted 0.6928\n", "jaccard_weighted 0.5632\n", "precision_weighted 0.9315\n", "recall_weighted 0.5960\n", "roc_auc 0.6873\n", "Name: RF, dtype: float64" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "atom.rf.evaluate(threshold=thresholds)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "(%{x}, %{y})LDA - test", "legendgroup": "LDA", "legendgrouptitle": { "font": { "size": 16 }, "text": "LDA" }, "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", "name": "test", "showlegend": true, "type": "scatter", "x": [ 0, 0, 0, 0.02127659574468085, 0.02127659574468085, 0.1702127659574468, 0.1702127659574468, 0.5106382978723404, 0.5106382978723404, 1 ], "xaxis": "x", "y": [ 0, 0.07692307692307693, 0.6923076923076923, 0.6923076923076923, 0.8461538461538461, 0.8461538461538461, 0.9230769230769231, 0.9230769230769231, 1, 1 ], "yaxis": "y" }, { "hovertemplate": "(%{x}, %{y})RF - test", "legendgroup": "RF", "legendgrouptitle": { "font": { "size": 16 }, "text": "RF" }, "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", "name": "test", "showlegend": true, "type": "scatter", "x": [ 0, 0, 1 ], "xaxis": "x", "y": [ 0, 0.07692307692307693, 1 ], "yaxis": "y" }, { "hovertemplate": "(%{x}, %{y})MLP - test", "legendgroup": "MLP", "legendgrouptitle": { "font": { "size": 16 }, "text": "MLP" }, "line": { "color": "rgb(115, 175, 72)", "width": 2 }, "marker": { "color": "rgb(115, 175, 72)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines", "name": "test", "showlegend": true, "type": "scatter", "x": [ 0, 0, 0, 0.02127659574468085, 0.02127659574468085, 0.06382978723404255, 0.06382978723404255, 0.14893617021276595, 0.14893617021276595, 0.48936170212765956, 0.48936170212765956, 1 ], "xaxis": "x", "y": [ 0, 0.07692307692307693, 0.5384615384615384, 0.5384615384615384, 0.7692307692307693, 0.7692307692307693, 0.8461538461538461, 0.8461538461538461, 0.9230769230769231, 0.9230769230769231, 1, 1 ], "yaxis": "y" } ], "layout": { "font": { "size": 12 }, "height": 600, "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 }, "shapes": [ { "layer": "below", "line": { "color": "black", "dash": "dash", "width": 1 }, "opacity": 0.6, "type": "line", "x0": 0, "x1": 1, "xref": "x domain", "y0": 0, "y1": 1, "yref": "y domain" } ], "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, "domain": [ 0, 1 ], "range": [ -0.03, 1.03 ], "title": { "font": { "size": 16 }, "text": "FPR" }, "type": "linear" }, "yaxis": { "anchor": "x", "automargin": true, "domain": [ 0, 1 ], "range": [ -0.03, 1.03 ], "title": { "font": { "size": 16 }, "text": "TPR" }, "type": "linear" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Use the target parameter in plots to specify which target column to use\n", "atom.plot_roc(target=2)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "tags": [] }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "fill": "tonexty", "fillcolor": "rgba(0, 98, 98, 0.2)", "fillpattern": { "shape": "" }, "legendgroup": "MLP", "legendgrouptitle": { "font": { "size": 16 }, "text": "MLP" }, "line": { "color": "rgb(0, 98, 98)", "width": 2 }, "mode": "lines", "name": "y2=0", "showlegend": true, "type": "scatter", "x": [ 0, 0.010101010101010102, 0.020202020202020204, 0.030303030303030304, 0.04040404040404041, 0.05050505050505051, 0.06060606060606061, 0.07070707070707072, 0.08080808080808081, 0.09090909090909091, 0.10101010101010102, 0.11111111111111112, 0.12121212121212122, 0.13131313131313133, 0.14141414141414144, 0.15151515151515152, 0.16161616161616163, 0.17171717171717174, 0.18181818181818182, 0.19191919191919193, 0.20202020202020204, 0.21212121212121213, 0.22222222222222224, 0.23232323232323235, 0.24242424242424243, 0.25252525252525254, 0.26262626262626265, 0.27272727272727276, 0.2828282828282829, 0.29292929292929293, 0.30303030303030304, 0.31313131313131315, 0.32323232323232326, 0.33333333333333337, 0.3434343434343435, 0.3535353535353536, 0.36363636363636365, 0.37373737373737376, 0.38383838383838387, 0.393939393939394, 0.4040404040404041, 0.4141414141414142, 0.42424242424242425, 0.43434343434343436, 0.4444444444444445, 0.4545454545454546, 0.4646464646464647, 0.4747474747474748, 0.48484848484848486, 0.494949494949495, 0.5050505050505051, 0.5151515151515152, 0.5252525252525253, 0.5353535353535354, 0.5454545454545455, 0.5555555555555556, 0.5656565656565657, 0.5757575757575758, 0.5858585858585859, 0.595959595959596, 0.6060606060606061, 0.6161616161616162, 0.6262626262626263, 0.6363636363636365, 0.6464646464646465, 0.6565656565656566, 0.6666666666666667, 0.6767676767676768, 0.686868686868687, 0.696969696969697, 0.7070707070707072, 0.7171717171717172, 0.7272727272727273, 0.7373737373737375, 0.7474747474747475, 0.7575757575757577, 0.7676767676767677, 0.7777777777777778, 0.787878787878788, 0.797979797979798, 0.8080808080808082, 0.8181818181818182, 0.8282828282828284, 0.8383838383838385, 0.8484848484848485, 0.8585858585858587, 0.8686868686868687, 0.8787878787878789, 0.888888888888889, 0.8989898989898991, 0.9090909090909092, 0.9191919191919192, 0.9292929292929294, 0.9393939393939394, 0.9494949494949496, 0.9595959595959597, 0.9696969696969697, 0.9797979797979799, 0.98989898989899, 1 ], "xaxis": "x", "y": [ 5.962965155508207, 6.056551020643414, 5.960054674124654, 5.687614106284525, 5.269711173598409, 4.748105748202405, 4.169430131467758, 3.578773826198119, 3.0144276503972627, 2.5045371131197216, 2.0658917376212123, 1.7046063149258672, 1.4181403159278896, 1.1979896918854251, 1.0324434251770713, 0.9089605575139804, 0.8159212246131607, 0.7436834858390744, 0.685008066211401, 0.6349896464676583, 0.5906637602148292, 0.550455174818651, 0.5136086675689773, 0.4797057588748474, 0.448328606412693, 0.4188910515595909, 0.39062188468894865, 0.3626605052448872, 0.33421217006293125, 0.3047088331034675, 0.27393039103021205, 0.24205702141892355, 0.20964263359422894, 0.17751839549885937, 0.1466502142994494, 0.1179821317089686, 0.09229757511096968, 0.07012299026068215, 0.05168614401511894, 0.03692799651491837, 0.025556094044979976, 0.017121334872161335, 0.011099341909982118, 0.0069614984885346225, 0.0042269215873029535, 0.0024930775472643786, 0.0014477676040225921, 8.680810564026353E-4, 6.126893042376699E-4, 6.130702744510069E-4, 8.675576383108441E-4, 0.0014400041196962852, 0.0024626081597645603, 0.004140210619730669, 0.0067512890981668685, 0.010639331238212065, 0.01618788852972545, 0.023774169187729063, 0.03370009920422737, 0.04610629245604369, 0.06088221542160338, 0.07759279640255722, 0.09544494560925328, 0.11331437421049978, 0.1298427198672069, 0.1435987736627475, 0.15327960917825523, 0.15791324722662337, 0.15701938439042507, 0.1506914121888832, 0.1395803431601181, 0.12478447234550377, 0.10767065586132261, 0.089667424635518, 0.07207299353005975, 0.055912762660687045, 0.041864881702483925, 0.030254453446472672, 0.0211022751483712, 0.014205933504278621, 0.009230193378964168, 0.005788317549320267, 0.003503437899620019, 0.0020466191114005914, 0.0011539318300704585, 6.27948181796886E-4, 3.298131654923741E-4, 1.6719092275783263E-4, 8.180087100155924E-5, 3.862813029148926E-5, 1.7605565263439394E-5, 7.744560661986595E-6, 3.2880932421429565E-6, 1.3473858730284073E-6, 5.328934484948002E-7, 2.034179619093676E-7, 7.494432334252376E-8, 2.6649478404744754E-8, 9.146168750920754E-9, 3.0296344688152882E-9 ], "yaxis": "y" }, { "fill": "tonexty", "fillcolor": "rgba(0, 98, 98, 0.2)", "fillpattern": { "shape": "/" }, "legendgroup": "MLP", "legendgrouptitle": { "font": { "size": 16 }, "text": "MLP" }, "line": { "color": "rgb(0, 98, 98)", "width": 2 }, "mode": "lines", "name": "y2=1", "showlegend": true, "type": "scatter", "x": [ 0, 0.010101010101010102, 0.020202020202020204, 0.030303030303030304, 0.04040404040404041, 0.05050505050505051, 0.06060606060606061, 0.07070707070707072, 0.08080808080808081, 0.09090909090909091, 0.10101010101010102, 0.11111111111111112, 0.12121212121212122, 0.13131313131313133, 0.14141414141414144, 0.15151515151515152, 0.16161616161616163, 0.17171717171717174, 0.18181818181818182, 0.19191919191919193, 0.20202020202020204, 0.21212121212121213, 0.22222222222222224, 0.23232323232323235, 0.24242424242424243, 0.25252525252525254, 0.26262626262626265, 0.27272727272727276, 0.2828282828282829, 0.29292929292929293, 0.30303030303030304, 0.31313131313131315, 0.32323232323232326, 0.33333333333333337, 0.3434343434343435, 0.3535353535353536, 0.36363636363636365, 0.37373737373737376, 0.38383838383838387, 0.393939393939394, 0.4040404040404041, 0.4141414141414142, 0.42424242424242425, 0.43434343434343436, 0.4444444444444445, 0.4545454545454546, 0.4646464646464647, 0.4747474747474748, 0.48484848484848486, 0.494949494949495, 0.5050505050505051, 0.5151515151515152, 0.5252525252525253, 0.5353535353535354, 0.5454545454545455, 0.5555555555555556, 0.5656565656565657, 0.5757575757575758, 0.5858585858585859, 0.595959595959596, 0.6060606060606061, 0.6161616161616162, 0.6262626262626263, 0.6363636363636365, 0.6464646464646465, 0.6565656565656566, 0.6666666666666667, 0.6767676767676768, 0.686868686868687, 0.696969696969697, 0.7070707070707072, 0.7171717171717172, 0.7272727272727273, 0.7373737373737375, 0.7474747474747475, 0.7575757575757577, 0.7676767676767677, 0.7777777777777778, 0.787878787878788, 0.797979797979798, 0.8080808080808082, 0.8181818181818182, 0.8282828282828284, 0.8383838383838385, 0.8484848484848485, 0.8585858585858587, 0.8686868686868687, 0.8787878787878789, 0.888888888888889, 0.8989898989898991, 0.9090909090909092, 0.9191919191919192, 0.9292929292929294, 0.9393939393939394, 0.9494949494949496, 0.9595959595959597, 0.9696969696969697, 0.9797979797979799, 0.98989898989899, 1 ], "xaxis": "x", "y": [ 0.406922117920246, 0.4183951420718064, 0.4295787006194711, 0.4404511056334437, 0.45099357274576884, 0.4611903720828543, 0.47102893856908234, 0.48049993979923844, 0.4895973004654415, 0.4983181831546975, 0.5066629261886036, 0.5146349400382041, 0.5222405646946816, 0.5294888911900388, 0.5363915512207664, 0.5429624795117542, 0.5492176541484751, 0.5551748205853665, 0.5608532053921164, 0.5662732260144832, 0.5714562028926764, 0.5764240801919054, 0.5811991611539287, 0.585803863676657, 0.5902605011765761, 0.5945910930955168, 0.5988172085926872, 0.6029598460322959, 0.6070393498574402, 0.6110753653561726, 0.6150868307023387, 0.6190920045203347, 0.6231085261091036, 0.6271535043966173, 0.631243630711708, 0.6353953095841173, 0.639624801042864, 0.6439483673015828, 0.6483824163179503, 0.6529436345092179, 0.6576491009089952, 0.6625163752684339, 0.6675635530390158, 0.6728092808197624, 0.6782727266986786, 0.6839735009508545, 0.6899315237528566, 0.6961668379089123, 0.7026993660287797, 0.7095486131163169, 0.7167333170850952, 0.7242710512745625, 0.7321777845579811, 0.7404674060724716, 0.7491512229239982, 0.7582374403901625, 0.7677306351284723, 0.7776312326685575, 0.787935000999666, 0.7986325723411007, 0.8097090051906047, 0.8211433984777888, 0.832908569106974, 0.8449708033632739, 0.857289691590823, 0.8698180542524706, 0.8825019659713295, 0.8952808824668642, 0.9080878734665404, 0.9208499627369198, 0.9334885743765037, 0.9459200824892617, 0.9580564593559702, 0.9698060152830266, 0.9810742214768332, 0.9917646056051382, 1.0017797082007345, 1.0110220867693265, 1.0193953534091282, 1.0268052309564857, 1.0331606121553647, 1.038374606118725, 1.0423655564102399, 1.0450580154230023, 1.046383660359183, 1.0462821370068394, 1.0447018186475792, 1.0416004687872213, 1.0369457979523906, 1.030715906507165, 1.0228996072807466, 1.0134966237230616, 1.0025176612825402, 0.9899843516911561, 0.9759290718087594, 0.9603946405857338, 0.9434338995160815, 0.9251091836408258, 0.9054916916960969, 0.8846607653570737 ], "yaxis": "y" } ], "layout": { "font": { "size": 12 }, "height": 600, "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.99, "yanchor": "top" }, "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, "domain": [ 0, 1 ], "range": [ 0, 1 ], "title": { "font": { "size": 16 }, "text": "Probability" }, "type": "linear" }, "yaxis": { "anchor": "x", "automargin": true, "autorange": true, "domain": [ 0, 1 ], "range": [ 0, 6.375316863835172 ], "title": { "font": { "size": 16 }, "text": "Probability density" }, "type": "linear" } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# When the target parameter also specifies the class, use format (column, class)\n", "atom.plot_probabilities(models=\"MLP\", target=(2, 1))" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "tags": [] }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "(%{x}, %{y})LDA - test", "legendgroup": "LDA", "legendgrouptitle": { "font": { "size": 16 }, "text": "LDA" }, "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": "test", "showlegend": true, "type": "scatter", "x": [ 0.06348984592169249, 0.1510786458708989, 0.23518880714640253, 0.370818910903557, 0.43045074385244503, 0.5507030680441044, 0.6954153097778527, 0.7772190646170453, 0.8590790257850909, 0.9640564702060637 ], "xaxis": "x2", "y": [ 0, 0.3333333333333333, 0, 0.25, 0, 1, 1, 0.6666666666666666, 0.7777777777777778, 1 ], "yaxis": "y" }, { "legendgroup": "LDA", "marker": { "color": "rgba(0, 98, 98, 0.2)", "line": { "color": "rgb(0, 98, 98)", "width": 2 } }, "name": "LDA", "showlegend": false, "type": "histogram", "x": [ 0.9527198818092723, 0.9708109121005406, 0.9797989703080704, 0.23758012936734538, 0.9281849168719497, 0.8104040376224958, 0.8945248521523889, 0.015748917621259465, 0.12849069681200087, 0.951279386526097, 0.9589311643045841, 0.9765794853189944, 0.9943699325248212, 0.6954153097778527, 0.9879631656569222, 0.999544023756101, 0.2529233547747171, 0.9679415457319962, 0.9173767474241404, 0.9586503223561303, 0.775709944265745, 0.5162794558877015, 0.7567184366359139, 0.9580836923166901, 0.45759862165509974, 0.9999267962050641, 0.09648258309247877, 0.9516134803463484, 0.7992288129494771, 0.9302523403983535, 0.8432144731661692, 0.8363168913414246, 0.9880564110153061, 0.9816784486669179, 0.17665164624575547, 0.5625796274941955, 0.3673970776056688, 0.21506293729714512, 0.4033028660497903, 0.9426909994245631, 0.9219115030527332, 0.9730145775666412, 0.8605026432021745, 0.8676039577876399, 0.3961468110271305, 0.8737162096689683, 0.5589264789507578, 0.5650267098437628, 0.9297504518597683, 0.3275962722883788, 0.39213548269304993, 0.14809359455494037, 0.8983476293007262, 0.9623185488465309, 0.9934548900110762, 0.9897505587725428, 0.9979632128894166, 0.07823803705133923, 0.9289647997082087, 0.84708053782383 ], "xaxis": "x2", "xbins": { "end": 1, "size": 0.1, "start": 0 }, "yaxis": "y2" }, { "hovertemplate": "(%{x}, %{y})RF - test", "legendgroup": "RF", "legendgrouptitle": { "font": { "size": 16 }, "text": "RF" }, "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": "test", "showlegend": true, "type": "scatter", "x": [ 0, 1 ], "xaxis": "x2", "y": [ 0.4583333333333333, 0.9166666666666666 ], "yaxis": "y" }, { "legendgroup": "RF", "marker": { "color": "rgba(56, 166, 165, 0.2)", "line": { "color": "rgb(56, 166, 165)", "width": 2 } }, "name": "RF", "showlegend": false, "type": "histogram", "x": [ 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1 ], "xaxis": "x2", "xbins": { "end": 1, "size": 0.1, "start": 0 }, "yaxis": "y2" }, { "hovertemplate": "(%{x}, %{y})MLP - test", "legendgroup": "MLP", "legendgrouptitle": { "font": { "size": 16 }, "text": "MLP" }, "line": { "color": "rgb(115, 175, 72)", "width": 2 }, "marker": { "color": "rgb(115, 175, 72)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines+markers", "name": "test", "showlegend": true, "type": "scatter", "x": [ 0.036113712123217706, 0.14166459377961027, 0.27996370889603767, 0.36142886794112555, 0.44493455976618007, 0.5694246993584682, 0.7536159528345957, 0.8822438492840134, 0.986345720361052 ], "xaxis": "x2", "y": [ 0, 0, 0, 0, 1, 1, 0.6666666666666666, 0.8, 0.9473684210526315 ], "yaxis": "y" }, { "legendgroup": "MLP", "marker": { "color": "rgba(115, 175, 72, 0.2)", "line": { "color": "rgb(115, 175, 72)", "width": 2 } }, "name": "MLP", "showlegend": false, "type": "histogram", "x": [ 0.992428744203113, 0.9962245717884589, 0.9837613114384384, 0.1406577249556127, 0.9959586623826358, 0.9978408890986785, 0.9724506714216299, 0.004494011107511716, 0.5694246993584682, 0.9960239645794569, 0.9951270263551705, 0.996208630539816, 0.9996457329016222, 0.9433202646334281, 0.9999561831437089, 0.9999965784454103, 0.32296771102418564, 0.9934112631318692, 0.9863599717562606, 0.9913905004096316, 0.8947131499848257, 0.9464296034079412, 0.8942038795265784, 0.9996108791392954, 0.7571646000948201, 0.9999992546322856, 0.007810582523906672, 0.9999420305805824, 0.8471100507748903, 0.9914261406688387, 0.8943634755550808, 0.9713866614678069, 0.9974606224665942, 0.9998697066879668, 0.1339414339021671, 0.44493455976618007, 0.0711686575910039, 0.06732884676259775, 0.39989002485806546, 0.9890130675141379, 0.9951114893808425, 0.9997713310635629, 0.9815133125194297, 0.988731625239087, 0.7678261551987453, 0.9187881120412424, 0.7358571032102219, 0.8808286905786922, 0.9618759662437563, 0.27996370889603767, 0.15039462248105104, 0.06159342921060638, 0.9691654287235404, 0.9480833062239268, 0.9999006067898918, 0.9984709796575484, 0.999904580028323, 0.004286745543679818, 0.993826786108385, 0.9907509169056617 ], "xaxis": "x2", "xbins": { "end": 1, "size": 0.1, "start": 0 }, "yaxis": "y2" }, { "hovertemplate": "(%{x}, %{y})LDA - test", "legendgroup": "LDA", "legendgrouptitle": { "font": { "size": 16 }, "text": "LDA" }, "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": "test", "showlegend": false, "type": "scatter", "x": [ 0.024411233605627414, 0.24090156283618436, 0.377680382719367, 0.46489467166173293, 0.6259416549247495, 0.8525612485106753, 0.995587900015221 ], "xaxis": "x4", "y": [ 0.08333333333333333, 0.6666666666666666, 0.5, 1, 0, 0.5, 0.9714285714285714 ], "yaxis": "y3" }, { "legendgroup": "LDA", "marker": { "color": "rgba(0, 98, 98, 0.2)", "line": { "color": "rgb(0, 98, 98)", "width": 2 } }, "name": "LDA", "showlegend": false, "type": "histogram", "x": [ 0.8331556274081071, 0.9839089294976906, 0.9825486623758173, 0.08694272379945302, 0.992067505739853, 0.9998114720596073, 0.9996865637534005, 0.9996805452909646, 0.46489467166173293, 0.9997254367754294, 0.3561366647028656, 0.9784671847352461, 6.761987602831937E-5, 0.9996325508107771, 0.0026832876804210267, 0.006882969850156436, 0.08534795539333162, 0.9852731606890707, 0.9989747035498978, 0.021859798410384403, 0.9999833684539914, 0.9965725069948309, 0.989495232328878, 0.9825099283668611, 0.8994748015201981, 0.04889898689438099, 0.9999814934076581, 0.0040135916299822135, 0.3992241007358684, 0.999274631683926, 0.9994480440281717, 0.856243397586502, 0.831423815654291, 0.20915770491132496, 3.148165468630703E-5, 0.9973799795147483, 0.9981582451756934, 0.03599558069748697, 2.102720519894167E-4, 0.9765231661470642, 0.8516569172297872, 0.2911316702527688, 0.9999837968946128, 0.9993414514417718, 0.22241531334445927, 0.9999258940618075, 0.9986588204645641, 0.9995524947250413, 0.999594169002509, 0.9996108318896153, 0.998618785741861, 0.9997738224725882, 0.9982926446478237, 0.9997149436491665, 0.8434129316651664, 0.9998995994391403, 0.6259416549247495, 5.353292281549647E-7, 0.9956357290339043, 0.997870205688753 ], "xaxis": "x4", "xbins": { "end": 1, "size": 0.1, "start": 0 }, "yaxis": "y4" }, { "hovertemplate": "(%{x}, %{y})RF - test", "legendgroup": "RF", "legendgrouptitle": { "font": { "size": 16 }, "text": "RF" }, "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": "test", "showlegend": false, "type": "scatter", "x": [ 0, 1 ], "xaxis": "x4", "y": [ 0.5151515151515151, 0.9259259259259259 ], "yaxis": "y3" }, { "legendgroup": "RF", "marker": { "color": "rgba(56, 166, 165, 0.2)", "line": { "color": "rgb(56, 166, 165)", "width": 2 } }, "name": "RF", "showlegend": false, "type": "histogram", "x": [ 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1 ], "xaxis": "x4", "xbins": { "end": 1, "size": 0.1, "start": 0 }, "yaxis": "y4" }, { "hovertemplate": "(%{x}, %{y})MLP - test", "legendgroup": "MLP", "legendgrouptitle": { "font": { "size": 16 }, "text": "MLP" }, "line": { "color": "rgb(115, 175, 72)", "width": 2 }, "marker": { "color": "rgb(115, 175, 72)", "line": { "color": "rgba(255, 255, 255, 0.9)", "width": 1 }, "size": 8, "symbol": "circle" }, "mode": "lines+markers", "name": "test", "showlegend": false, "type": "scatter", "x": [ 0.039146144897136845, 0.137368913862604, 0.25670377449447396, 0.3323099441133031, 0.6330971414959853, 0.7879351508092388, 0.8229522398268935, 0.9708308698508414 ], "xaxis": "x4", "y": [ 0, 0.14285714285714285, 0, 1, 1, 1, 0.6666666666666666, 0.9696969696969697 ], "yaxis": "y3" }, { "legendgroup": "MLP", "marker": { "color": "rgba(115, 175, 72, 0.2)", "line": { "color": "rgb(115, 175, 72)", "width": 2 } }, "name": "MLP", "showlegend": false, "type": "histogram", "x": [ 0.10469641968844329, 0.9091690178311933, 0.954203295664109, 0.8261834415824127, 0.8024635457163384, 0.9994425205879444, 0.9281891801026154, 0.9936640702872759, 0.9292092139283219, 0.995868096825834, 0.11534584126629042, 0.8194962493028433, 1.5480216316404637E-4, 0.9950972991740077, 0.05952075198770751, 0.09775234020412298, 0.6163035051750475, 0.9407398513196081, 0.9851818899781655, 0.024434630548574823, 0.9994304395392511, 0.9379488829812722, 0.8278119229242639, 0.985041029482039, 0.9978763416762655, 0.1162302619479178, 0.9984354333791815, 0.1589091317121744, 0.27907902007633495, 0.9716039675988143, 0.9391817829647421, 0.8547025691306024, 0.6529848758464428, 0.8070557103049001, 0.05063643820562873, 0.6300030434664655, 0.9933337701800208, 0.2203297145615116, 0.12056369052812196, 0.7879351508092388, 0.3323099441133031, 0.2707025888455754, 0.9983408331182552, 0.9983415776469905, 0.9191226749276054, 0.9970058370580951, 0.9272672724306822, 0.9283343347761336, 0.9630479942440789, 0.9998116488079646, 0.9999054547354741, 0.9980047870904852, 0.9638048894815331, 0.9764966743207788, 0.16302203813499017, 0.9992917378956429, 0.18281501376028994, 0.002377906273622974, 0.9554294933407679, 0.9595974117026222 ], "xaxis": "x4", "xbins": { "end": 1, "size": 0.1, "start": 0 }, "yaxis": "y4" } ], "layout": { "barmode": "overlay", "font": { "size": 12 }, "height": 600, "hoverlabel": { "font": { "size": 16 } }, "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": 35 }, "shapes": [ { "layer": "below", "line": { "color": "black", "dash": "dash", "width": 1 }, "opacity": 0.6, "type": "line", "x0": 0, "x1": 1, "xref": "x2 domain", "y0": 0, "y1": 1, "yref": "y domain" }, { "layer": "below", "line": { "color": "black", "dash": "dash", "width": 1 }, "opacity": 0.6, "type": "line", "x0": 0, "x1": 1, "xref": "x4 domain", "y0": 0, "y1": 1, "yref": "y3 domain" } ], "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, "domain": [ 0, 0.45 ], "title": { "font": { "size": 16 } } }, "xaxis2": { "anchor": "y2", "automargin": true, "domain": [ 0, 0.45 ], "range": [ 0, 1 ], "showgrid": true, "title": { "font": { "size": 16 }, "text": "Predicted value" }, "type": "linear" }, "xaxis3": { "anchor": "y3", "automargin": true, "domain": [ 0.55, 1 ], "title": { "font": { "size": 16 } } }, "xaxis4": { "anchor": "y4", "automargin": true, "domain": [ 0.55, 1 ], "range": [ 0, 1 ], "showgrid": true, "title": { "font": { "size": 16 }, "text": "Predicted value" }, "type": "linear" }, "yaxis": { "anchor": "x2", "automargin": true, "domain": [ 0.31, 1 ], "range": [ -0.05, 1.05 ], "title": { "font": { "size": 16 }, "text": "Fraction of positives" }, "type": "linear" }, "yaxis2": { "anchor": "x2", "automargin": true, "autorange": true, "domain": [ 0, 0.29 ], "range": [ 0, 40 ], "title": { "font": { "size": 16 }, "text": "Count" } }, "yaxis3": { "anchor": "x4", "automargin": true, "domain": [ 0.31, 1 ], "range": [ -0.05, 1.05 ], "title": { "font": { "size": 16 }, "text": "Fraction of positives" }, "type": "linear" }, "yaxis4": { "anchor": "x4", "automargin": true, "autorange": true, "domain": [ 0, 0.29 ], "range": [ 0, 36.8421052631579 ], "title": { "font": { "size": 16 }, "text": "Count" } } } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "with atom.canvas(figsize=(900, 600)):\n", " atom.plot_calibration(target=0)\n", " atom.plot_calibration(target=1)\n" ] } ], "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.9" }, "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 }