Created
April 22, 2020 23:02
-
-
Save alexlenail/91959d9d71dfd2d1043c8b5f8acec632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"%matplotlib inline\n", | |
"\n", | |
"from scipy.stats import lognorm\n", | |
"from scipy.integrate import quad as integrate\n", | |
"from sklearn.metrics import auc\n", | |
"exp = np.exp\n", | |
"from collections import defaultdict\n", | |
"\n", | |
"pd.options.display.max_columns = 50\n", | |
"pd.options.display.max_rows = 30\n", | |
"\n", | |
"from ipywidgets import interact, interactive, fixed, interact_manual\n", | |
"import ipywidgets as widgets" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"1. Generate two such histograms, one representing the signal for a wild-type starting clone, and one representing a desired higher-affinity clone (with higher mean MFI but same standard deviation). The two parameters to choose are the ratio of the mutant to wild-type mean MFI, and the standard deviation applied to both curves. You can explore variations in each of these parameters in the next step." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"2. Construct an ROC curve by varying the cutoff MFI threshold for retention across the full range of values used in (1). " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"wt_color = 'blue'\n", | |
"dc_color = 'orange'\n", | |
"size = 200\n", | |
"μ_1 = 1.0" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def tpr_fpr(cutoff, negative, positive, size=size):\n", | |
" \n", | |
" true_negative = sum(negative <= cutoff)\n", | |
" false_positive = size - true_negative\n", | |
" \n", | |
" true_positive = sum(positive >= cutoff)\n", | |
" false_negative = size - true_positive\n", | |
" \n", | |
" tpr = true_positive / (true_positive + false_negative)\n", | |
" fpr = false_positive / (true_negative + false_positive)\n", | |
"\n", | |
" return tpr, fpr" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"application/vnd.jupyter.widget-view+json": { | |
"model_id": "ad923cbe304b4795a527953488cfbb1a", | |
"version_major": 2, | |
"version_minor": 0 | |
}, | |
"text/plain": [ | |
"interactive(children=(FloatSlider(value=0.5, description='μ_ratio', max=1.0, step=0.01), FloatSlider(value=0.2…" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"@interact(μ_ratio=(0.0,1.0,0.01), σ=(0.0,1.0,0.01))\n", | |
"def ROC_analysis(μ_ratio=0.5, σ=0.2):\n", | |
" \n", | |
" μ_2 = μ_1 + μ_ratio # addition, because exponentiating these means multiplication. \n", | |
" σ_2 = σ_1 = σ\n", | |
"\n", | |
" wt_dist = lognorm(σ_1, scale=exp(μ_1))\n", | |
" dc_dist = lognorm(σ_2, scale=exp(μ_2))\n", | |
" wt = pd.Series(wt_dist.rvs(size=size))\n", | |
" dc = pd.Series(dc_dist.rvs(size=size))\n", | |
" \n", | |
" mn = np.min([wt.min(), dc.min()])\n", | |
" mx = np.max([wt.max(), dc.max()])\n", | |
" bins = np.linspace(mn, mx, num=50)\n", | |
" logbins = np.geomspace(mn, mx, num=50)\n", | |
" \n", | |
" fig = plt.figure(figsize=(10, 7), dpi=140)\n", | |
" grid = plt.GridSpec(2, 3, wspace=0.4, hspace=0.3)\n", | |
" top = plt.subplot(grid[0, 0:])\n", | |
" bottom_left = plt.subplot(grid[1, :2])\n", | |
" bottom_right = plt.subplot(grid[1, 2:])\n", | |
"\n", | |
" top.set_title('linear x', size='x-large')\n", | |
" wt.plot.hist(bins=bins, alpha=0.5, color=wt_color, edgecolor=wt_color, ax=top)\n", | |
" dc.plot.hist(bins=bins, alpha=0.5, color=dc_color, edgecolor=dc_color, ax=top)\n", | |
" \n", | |
" bottom_left.set_title('log x', size='x-large')\n", | |
" wt.plot.hist(bins=logbins, alpha=0.5, color=wt_color, edgecolor=wt_color, ax=bottom_left, logx=True)\n", | |
" dc.plot.hist(bins=logbins, alpha=0.5, color=dc_color, edgecolor=dc_color, ax=bottom_left, logx=True)\n", | |
"\n", | |
" \n", | |
" s = pd.concat([wt, dc]).sort_values(ignore_index=True)\n", | |
" assert s.is_unique\n", | |
"\n", | |
" roc = pd.DataFrame.from_records(s.apply(tpr_fpr, args=(wt, dc)), columns=['tpr', 'fpr'])\n", | |
" auroc = auc(roc['fpr'], roc['tpr'])\n", | |
"\n", | |
" roc.plot.line(x='fpr', y='tpr', ax=bottom_right, xlim=(0.0, 1.0), ylim=(0.0, 1.0), color='darkorange', lw=2, title='Receiver operating characteristic', label='ROC curve (area = %0.3f)' % auroc)\n", | |
" plt.xlabel('False Positive Rate')\n", | |
" plt.ylabel('True Positive Rate')\n", | |
" plt.plot([0, 1], [0, 1], color='navy', lw=2, linestyle='--')\n", | |
" \n", | |
" bottom_right.set_aspect(\"equal\")" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"3.\tAUC, or area under curve, for the ROC is used to determine how powerful an assay or discriminator is, with AUC=1 being perfect and AUC = 0.5 being random. Assess AUC as a function of a) the mutant:wild-type mean MFI ratio and b) the standard deviation. If you’re feeling ambitious, plot a topo map of AUC values on the 2-d plane for a range of these two parameters (say 1.1x to 10x for the mean ratio, and 1% to 100% for the coefficient of variance (standard deviation divided by mean)). These ranges would encompass the most likely experimental situations for flow cytometric screening of combinatorial libraries." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 51, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def grid_auc():\n", | |
"\n", | |
" grid_auc = defaultdict(lambda: defaultdict(None))\n", | |
"\n", | |
" for μ_ratio in np.arange(0.0,1.05,0.05):\n", | |
" for σ in np.arange(0.05,1.05,0.05):\n", | |
"\n", | |
" μ_2 = μ_1 + μ_ratio # addition, because exponentiating these means multiplication. \n", | |
" σ_2 = σ_1 = σ\n", | |
"\n", | |
" negative = lognorm(σ_1, scale=exp(μ_1))\n", | |
" positive = lognorm(σ_2, scale=exp(μ_2))\n", | |
" auc, err = integrate(lambda t: (1-positive.cdf(t)) * negative.pdf(t), np.NINF, np.inf)\n", | |
"\n", | |
" grid_auc[μ_ratio][σ] = auc\n", | |
"\n", | |
" return pd.DataFrame(grid_auc).rename_axis('σ', axis=0).rename_axis('μ_ratio', axis=1)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 60, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"aucs = grid_auc()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 102, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"application/vnd.plotly.v1+json": { | |
"config": { | |
"plotlyServerURL": "https://plotly.com" | |
}, | |
"data": [ | |
{ | |
"type": "surface", | |
"x": [ | |
0.05, | |
0.1, | |
0.15000000000000002, | |
0.2, | |
0.25, | |
0.3, | |
0.35000000000000003, | |
0.4, | |
0.45, | |
0.5, | |
0.55, | |
0.6000000000000001, | |
0.6500000000000001, | |
0.7000000000000001, | |
0.7500000000000001, | |
0.8, | |
0.8500000000000001, | |
0.9000000000000001, | |
0.9500000000000001, | |
1 | |
], | |
"y": [ | |
0, | |
0.05, | |
0.1, | |
0.15000000000000002, | |
0.2, | |
0.25, | |
0.30000000000000004, | |
0.35000000000000003, | |
0.4, | |
0.45, | |
0.5, | |
0.55, | |
0.6000000000000001, | |
0.65, | |
0.7000000000000001, | |
0.75, | |
0.8, | |
0.8500000000000001, | |
0.9, | |
0.9500000000000001, | |
1 | |
], | |
"z": [ | |
[ | |
0.49999999999999967, | |
0.7602499389065236, | |
0.9213503964748576, | |
0.9830525732376569, | |
0.9976611325094766, | |
0.9997965239912774, | |
0.9999889547515007, | |
0.9999996284508137, | |
0.9999999922913709, | |
0.999999999901692, | |
0.9999999999992313, | |
0.9999999999999962, | |
1, | |
1, | |
1, | |
1, | |
1, | |
1, | |
1, | |
1, | |
1 | |
], | |
[ | |
0.5000000000000001, | |
0.6381631950841188, | |
0.7602499389065238, | |
0.8555778168267576, | |
0.9213503964748576, | |
0.9614500641282293, | |
0.9830525732376554, | |
0.9933358356095914, | |
0.997661132509477, | |
0.9992686417066596, | |
0.9997965239912777, | |
0.9999496890389403, | |
0.9999889547515007, | |
0.9999978486102684, | |
0.999999628450814, | |
0.9999999431363719, | |
0.9999999922913712, | |
0.9999999990747129, | |
0.9999999999016921, | |
0.9999999999907575, | |
0.9999999999992314 | |
], | |
[ | |
0.5000000000000088, | |
0.593168142116613, | |
0.6813240558830406, | |
0.760249938906532, | |
0.8271107069244285, | |
0.8807035853417912, | |
0.9213503964748663, | |
0.9505199229903059, | |
0.970326780604049, | |
0.983052573237664, | |
0.9907889372729594, | |
0.9952390544079593, | |
0.9976611325094852, | |
0.9989084776313276, | |
0.9995162857748849, | |
0.9997965239912863, | |
0.9999187795774154, | |
0.9999692445548323, | |
0.9999889547515096, | |
0.999996238765855, | |
0.9999987857662722 | |
], | |
[ | |
0.5000000000000001, | |
0.5701581024006671, | |
0.6381631950841189, | |
0.7020584547174114, | |
0.7602499389065234, | |
0.8116204410942092, | |
0.855577816826758, | |
0.89203753052993, | |
0.9213503964748573, | |
0.9441941158508538, | |
0.9614500641282291, | |
0.9740850363910453, | |
0.9830525732376554, | |
0.989221866619992, | |
0.9933358356095916, | |
0.9959950288350603, | |
0.9976611325095444, | |
0.9986729853202589, | |
0.9992686417066596, | |
0.9996085308910546, | |
0.9997965239912776 | |
], | |
[ | |
0.5000000000000002, | |
0.5562314580091425, | |
0.6113512946052393, | |
0.6643133797295637, | |
0.7141961775233341, | |
0.7602499389065235, | |
0.8019280454239632, | |
0.8389005969187093, | |
0.8710504823538304, | |
0.8984541062114156, | |
0.9213503964748575, | |
0.9401025347870411, | |
0.9551569891148177, | |
0.9670039724703263, | |
0.9761425598813247, | |
0.9830525732376545, | |
0.9881741916723221, | |
0.9918952292953873, | |
0.9945452508178656, | |
0.9963952146176285, | |
0.9976611325094767 | |
], | |
[ | |
0.5, | |
0.546907192122536, | |
0.5931681421166043, | |
0.6381631950841185, | |
0.6813240558830316, | |
0.722155104858603, | |
0.7602499389065234, | |
0.7953022568950407, | |
0.8271107069244197, | |
0.8555778168267574, | |
0.8807035853417824, | |
0.9025746756955824, | |
0.9213503964748574, | |
0.9372467642812743, | |
0.9505199229902999, | |
0.9614500641282293, | |
0.9703267806040404, | |
0.9774365255556621, | |
0.9830525732376555, | |
0.9874276194133215, | |
0.9907889372729508 | |
], | |
[ | |
0.49999999999999994, | |
0.5402308245930559, | |
0.580053563364366, | |
0.6190725068906454, | |
0.6569160750723805, | |
0.6932473669360447, | |
0.7277730113626487, | |
0.7602499389065233, | |
0.7904898332328422, | |
0.8183611695319533, | |
0.8437888943786533, | |
0.8667519355212342, | |
0.8872788415027448, | |
0.9054419329894567, | |
0.9213503964748584, | |
0.9351427661060441, | |
0.946979223149915, | |
0.9570340998900255, | |
0.965488912008272, | |
0.9725261681064563, | |
0.9783241243695688 | |
], | |
[ | |
0.49999999999999994, | |
0.5352159888611934, | |
0.5701581024006668, | |
0.6045588385296877, | |
0.6381631950841186, | |
0.670734316750798, | |
0.7020584547174114, | |
0.7319490678749666, | |
0.7602499389065235, | |
0.786837228307796, | |
0.811620441094209, | |
0.834542331443041, | |
0.8555778168267578, | |
0.8747320127931812, | |
0.8920375305299301, | |
0.9075512005172001, | |
0.9213503964748577, | |
0.9335291347174328, | |
0.944194115850854, | |
0.9534608598908434, | |
0.9614500641282293 | |
], | |
[ | |
0.5000000000000001, | |
0.5313116488133846, | |
0.5624307099597985, | |
0.5931681421166044, | |
0.6233418880343247, | |
0.6527800996822031, | |
0.6813240558830294, | |
0.7088306904493215, | |
0.7351746649733255, | |
0.7602499389065234, | |
0.7839708094290538, | |
0.8062724138514069, | |
0.8271107069244201, | |
0.846461943551132, | |
0.8643217132142011, | |
0.8807035853417825, | |
0.8956374344123393, | |
0.9091675196299486, | |
0.9213503964748577, | |
0.9322527365266777, | |
0.941949128009726 | |
], | |
[ | |
0.5000000000021239, | |
0.5281859888985089, | |
0.5562314580091434, | |
0.5839979857136818, | |
0.6113512946052403, | |
0.6381631950841196, | |
0.6643133797295648, | |
0.6896910267811561, | |
0.7141961775233352, | |
0.7377408598934627, | |
0.7602499389065243, | |
0.781661683162556, | |
0.8019280454239605, | |
0.8210146636778269, | |
0.8389005969187103, | |
0.8555778168267586, | |
0.8710504823538312, | |
0.8853340288041773, | |
0.8984541062114171, | |
0.9104454036366402, | |
0.9213503964748584 | |
], | |
[ | |
0.49999999999999545, | |
0.5256273301796881, | |
0.5511490171082739, | |
0.5764607222152706, | |
0.6014606894739196, | |
0.6260509703998948, | |
0.6501385716516601, | |
0.6736365028979943, | |
0.6964647054242615, | |
0.7185508452597373, | |
0.7398309583065726, | |
0.7602499389065196, | |
0.7797618673594661, | |
0.7983301759721426, | |
0.8159276571355447, | |
0.8325363205853042, | |
0.8481471102847093, | |
0.8627594941978852, | |
0.8763809425241916, | |
0.8890263117002656, | |
0.9007171526195924 | |
], | |
[ | |
0.5000000000000085, | |
0.5234943022886457, | |
0.5469071921225481, | |
0.5701581024006735, | |
0.5931681421166108, | |
0.6158608982270898, | |
0.6381631950841469, | |
0.6600057988828867, | |
0.6813240558830703, | |
0.7020584547174538, | |
0.7221551048586461, | |
0.7415661252245749, | |
0.76024993890653, | |
0.7781714720441502, | |
0.7953022568950473, | |
0.8116204410942156, | |
0.8271107069244265, | |
0.8417641060760176, | |
0.855577816826764, | |
0.868554831790083, | |
0.8807035853417888 | |
], | |
[ | |
0.49999999999995753, | |
0.5216889041143359, | |
0.5433137504757136, | |
0.5648110483522716, | |
0.5861184326975042, | |
0.607175206272874, | |
0.6279228573839521, | |
0.6483055458842405, | |
0.668270550744904, | |
0.6877686732618917, | |
0.706754590853921, | |
0.725187157373159, | |
0.7430296468807803, | |
0.7602499389064845, | |
0.7768206442887313, | |
0.7927191717555949, | |
0.8079277364305207, | |
0.8224333124105639, | |
0.8362275324473918, | |
0.8493065385414369, | |
0.861670787945529 | |
], | |
[ | |
0.5000000000005789, | |
0.5201410642429275, | |
0.5402308245936347, | |
0.5602183688763696, | |
0.5800535633649445, | |
0.5996874296452789, | |
0.6190725068907652, | |
0.6381631950848705, | |
0.6569160750731973, | |
0.6752902017242246, | |
0.6932473669366235, | |
0.7107523297477712, | |
0.7277730113632274, | |
0.7442806534821956, | |
0.7602499389071018, | |
0.7756590740120708, | |
0.7904898332334203, | |
0.804727566309795, | |
0.8183611695325306, | |
0.8313830227584398, | |
0.8437888943792299 | |
], | |
[ | |
0.5000000000000787, | |
0.518799356469329, | |
0.5375569906932115, | |
0.5562314580091571, | |
0.5747818658438414, | |
0.5931681421166186, | |
0.6113512946052537, | |
0.6292936584800066, | |
0.6469591293929787, | |
0.6643133797295782, | |
0.681324055883046, | |
0.6979609546963931, | |
0.7141961775233491, | |
0.7300042606852354, | |
0.7453622814379737, | |
0.7602499389065391, | |
0.7746496097869489, | |
0.7885463789523202, | |
0.8019280454239821, | |
0.8147851044757406, | |
0.827110706924443 | |
], | |
[ | |
0.4999999999998853, | |
0.517625186933547, | |
0.5352159888610791, | |
0.5527382218907755, | |
0.5701581024005528, | |
0.5874424423014112, | |
0.6045588385295744, | |
0.6214758549659826, | |
0.6381631950840055, | |
0.654591863749809, | |
0.6707343165933685, | |
0.6865645967659771, | |
0.7020584547172998, | |
0.7171934555668006, | |
0.7319490678748553, | |
0.7463067366088573, | |
0.7602499389064107, | |
0.773764222699658, | |
0.7868372283076792, | |
0.7994586932970551, | |
0.8116204410940836 | |
], | |
[ | |
0.5000000000003252, | |
0.5165890276867517, | |
0.5331493835766484, | |
0.5496525444545334, | |
0.5660702829809676, | |
0.5823748124417204, | |
0.5985389277093799, | |
0.6145361412286685, | |
0.6303408128939554, | |
0.6459282727605037, | |
0.6612749356157767, | |
0.676358406532642, | |
0.6911575766311675, | |
0.7056527083882798, | |
0.7198255099532325, | |
0.7336591980498607, | |
0.7471385491722161, | |
0.7602499389066256, | |
0.7729813693387327, | |
0.7853224846269955, | |
0.7972645749428031 | |
], | |
[ | |
0.4999999999999982, | |
0.515667902962286, | |
0.5313116488133814, | |
0.5469071921225321, | |
0.5624307099597944, | |
0.5778587110055242, | |
0.5931681421165997, | |
0.6083364915442685, | |
0.623341888034322, | |
0.6381631950841183, | |
0.6527800996822081, | |
0.6671731949142812, | |
0.6813240558830481, | |
0.6952153084586535, | |
0.7088306904493654, | |
0.7221551048586617, | |
0.7351746649734108, | |
0.7478767311076697, | |
0.7602499388692131, | |
0.7722842191948307, | |
0.7839708094292899 | |
], | |
[ | |
0.4999999999964511, | |
0.5148436677051821, | |
0.5296667929179351, | |
0.5444489183870964, | |
0.5591697567724416, | |
0.5738092741271763, | |
0.588347771628151, | |
0.6027659650555618, | |
0.6170450613581309, | |
0.63116683189439, | |
0.6451136819598939, | |
0.6588687159301537, | |
0.6724157978188727, | |
0.6857396068162097, | |
0.6988256875109513, | |
0.711660494535969, | |
0.7242314314263324, | |
0.7365268835320993, | |
0.7485362448757893, | |
0.7602499389029651, | |
0.771659433119223 | |
], | |
[ | |
0.4999999999999333, | |
0.5141018016520983, | |
0.5281859888984426, | |
0.5422350133115468, | |
0.5562314580090714, | |
0.570158103871465, | |
0.583997985713593, | |
0.5977344689083333, | |
0.6113512946051114, | |
0.6248326446648464, | |
0.6381631950839182, | |
0.6513281678872662, | |
0.6643133797292411, | |
0.6771052869394585, | |
0.6896910267806402, | |
0.7020584547167666, | |
0.7141961775225338, | |
0.7260935820987153, | |
0.7377408598922596, | |
0.7491290268544407, | |
0.7602499389047835 | |
] | |
] | |
} | |
], | |
"layout": { | |
"autosize": false, | |
"height": 900, | |
"scene": { | |
"xaxis": { | |
"title": { | |
"text": "μ_ratio" | |
} | |
}, | |
"yaxis": { | |
"title": { | |
"text": "σ" | |
} | |
}, | |
"zaxis": { | |
"title": { | |
"text": "AUROC" | |
} | |
} | |
}, | |
"template": { | |
"data": { | |
"bar": [ | |
{ | |
"error_x": { | |
"color": "#2a3f5f" | |
}, | |
"error_y": { | |
"color": "#2a3f5f" | |
}, | |
"marker": { | |
"line": { | |
"color": "#E5ECF6", | |
"width": 0.5 | |
} | |
}, | |
"type": "bar" | |
} | |
], | |
"barpolar": [ | |
{ | |
"marker": { | |
"line": { | |
"color": "#E5ECF6", | |
"width": 0.5 | |
} | |
}, | |
"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": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "histogram" | |
} | |
], | |
"histogram2d": [ | |
{ | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
}, | |
"colorscale": [ | |
[ | |
0, | |
"#0d0887" | |
], | |
[ | |
0.1111111111111111, | |
"#46039f" | |
], | |
[ | |
0.2222222222222222, | |
"#7201a8" | |
], | |
[ | |
0.3333333333333333, | |
"#9c179e" | |
], | |
[ | |
0.4444444444444444, | |
"#bd3786" | |
], | |
[ | |
0.5555555555555556, | |
"#d8576b" | |
], | |
[ | |
0.6666666666666666, | |
"#ed7953" | |
], | |
[ | |
0.7777777777777778, | |
"#fb9f3a" | |
], | |
[ | |
0.8888888888888888, | |
"#fdca26" | |
], | |
[ | |
1, | |
"#f0f921" | |
] | |
], | |
"type": "histogram2d" | |
} | |
], | |
"histogram2dcontour": [ | |
{ | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
}, | |
"colorscale": [ | |
[ | |
0, | |
"#0d0887" | |
], | |
[ | |
0.1111111111111111, | |
"#46039f" | |
], | |
[ | |
0.2222222222222222, | |
"#7201a8" | |
], | |
[ | |
0.3333333333333333, | |
"#9c179e" | |
], | |
[ | |
0.4444444444444444, | |
"#bd3786" | |
], | |
[ | |
0.5555555555555556, | |
"#d8576b" | |
], | |
[ | |
0.6666666666666666, | |
"#ed7953" | |
], | |
[ | |
0.7777777777777778, | |
"#fb9f3a" | |
], | |
[ | |
0.8888888888888888, | |
"#fdca26" | |
], | |
[ | |
1, | |
"#f0f921" | |
] | |
], | |
"type": "histogram2dcontour" | |
} | |
], | |
"mesh3d": [ | |
{ | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
}, | |
"type": "mesh3d" | |
} | |
], | |
"parcoords": [ | |
{ | |
"line": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "parcoords" | |
} | |
], | |
"pie": [ | |
{ | |
"automargin": true, | |
"type": "pie" | |
} | |
], | |
"scatter": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scatter" | |
} | |
], | |
"scatter3d": [ | |
{ | |
"line": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scatter3d" | |
} | |
], | |
"scattercarpet": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scattercarpet" | |
} | |
], | |
"scattergeo": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scattergeo" | |
} | |
], | |
"scattergl": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scattergl" | |
} | |
], | |
"scattermapbox": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scattermapbox" | |
} | |
], | |
"scatterpolar": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scatterpolar" | |
} | |
], | |
"scatterpolargl": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scatterpolargl" | |
} | |
], | |
"scatterternary": [ | |
{ | |
"marker": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"type": "scatterternary" | |
} | |
], | |
"surface": [ | |
{ | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
}, | |
"colorscale": [ | |
[ | |
0, | |
"#0d0887" | |
], | |
[ | |
0.1111111111111111, | |
"#46039f" | |
], | |
[ | |
0.2222222222222222, | |
"#7201a8" | |
], | |
[ | |
0.3333333333333333, | |
"#9c179e" | |
], | |
[ | |
0.4444444444444444, | |
"#bd3786" | |
], | |
[ | |
0.5555555555555556, | |
"#d8576b" | |
], | |
[ | |
0.6666666666666666, | |
"#ed7953" | |
], | |
[ | |
0.7777777777777778, | |
"#fb9f3a" | |
], | |
[ | |
0.8888888888888888, | |
"#fdca26" | |
], | |
[ | |
1, | |
"#f0f921" | |
] | |
], | |
"type": "surface" | |
} | |
], | |
"table": [ | |
{ | |
"cells": { | |
"fill": { | |
"color": "#EBF0F8" | |
}, | |
"line": { | |
"color": "white" | |
} | |
}, | |
"header": { | |
"fill": { | |
"color": "#C8D4E3" | |
}, | |
"line": { | |
"color": "white" | |
} | |
}, | |
"type": "table" | |
} | |
] | |
}, | |
"layout": { | |
"annotationdefaults": { | |
"arrowcolor": "#2a3f5f", | |
"arrowhead": 0, | |
"arrowwidth": 1 | |
}, | |
"coloraxis": { | |
"colorbar": { | |
"outlinewidth": 0, | |
"ticks": "" | |
} | |
}, | |
"colorscale": { | |
"diverging": [ | |
[ | |
0, | |
"#8e0152" | |
], | |
[ | |
0.1, | |
"#c51b7d" | |
], | |
[ | |
0.2, | |
"#de77ae" | |
], | |
[ | |
0.3, | |
"#f1b6da" | |
], | |
[ | |
0.4, | |
"#fde0ef" | |
], | |
[ | |
0.5, | |
"#f7f7f7" | |
], | |
[ | |
0.6, | |
"#e6f5d0" | |
], | |
[ | |
0.7, | |
"#b8e186" | |
], | |
[ | |
0.8, | |
"#7fbc41" | |
], | |
[ | |
0.9, | |
"#4d9221" | |
], | |
[ | |
1, | |
"#276419" | |
] | |
], | |
"sequential": [ | |
[ | |
0, | |
"#0d0887" | |
], | |
[ | |
0.1111111111111111, | |
"#46039f" | |
], | |
[ | |
0.2222222222222222, | |
"#7201a8" | |
], | |
[ | |
0.3333333333333333, | |
"#9c179e" | |
], | |
[ | |
0.4444444444444444, | |
"#bd3786" | |
], | |
[ | |
0.5555555555555556, | |
"#d8576b" | |
], | |
[ | |
0.6666666666666666, | |
"#ed7953" | |
], | |
[ | |
0.7777777777777778, | |
"#fb9f3a" | |
], | |
[ | |
0.8888888888888888, | |
"#fdca26" | |
], | |
[ | |
1, | |
"#f0f921" | |
] | |
], | |
"sequentialminus": [ | |
[ | |
0, | |
"#0d0887" | |
], | |
[ | |
0.1111111111111111, | |
"#46039f" | |
], | |
[ | |
0.2222222222222222, | |
"#7201a8" | |
], | |
[ | |
0.3333333333333333, | |
"#9c179e" | |
], | |
[ | |
0.4444444444444444, | |
"#bd3786" | |
], | |
[ | |
0.5555555555555556, | |
"#d8576b" | |
], | |
[ | |
0.6666666666666666, | |
"#ed7953" | |
], | |
[ | |
0.7777777777777778, | |
"#fb9f3a" | |
], | |
[ | |
0.8888888888888888, | |
"#fdca26" | |
], | |
[ | |
1, | |
"#f0f921" | |
] | |
] | |
}, | |
"colorway": [ | |
"#636efa", | |
"#EF553B", | |
"#00cc96", | |
"#ab63fa", | |
"#FFA15A", | |
"#19d3f3", | |
"#FF6692", | |
"#B6E880", | |
"#FF97FF", | |
"#FECB52" | |
], | |
"font": { | |
"color": "#2a3f5f" | |
}, | |
"geo": { | |
"bgcolor": "white", | |
"lakecolor": "white", | |
"landcolor": "#E5ECF6", | |
"showlakes": true, | |
"showland": true, | |
"subunitcolor": "white" | |
}, | |
"hoverlabel": { | |
"align": "left" | |
}, | |
"hovermode": "closest", | |
"mapbox": { | |
"style": "light" | |
}, | |
"paper_bgcolor": "white", | |
"plot_bgcolor": "#E5ECF6", | |
"polar": { | |
"angularaxis": { | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "" | |
}, | |
"bgcolor": "#E5ECF6", | |
"radialaxis": { | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "" | |
} | |
}, | |
"scene": { | |
"xaxis": { | |
"backgroundcolor": "#E5ECF6", | |
"gridcolor": "white", | |
"gridwidth": 2, | |
"linecolor": "white", | |
"showbackground": true, | |
"ticks": "", | |
"zerolinecolor": "white" | |
}, | |
"yaxis": { | |
"backgroundcolor": "#E5ECF6", | |
"gridcolor": "white", | |
"gridwidth": 2, | |
"linecolor": "white", | |
"showbackground": true, | |
"ticks": "", | |
"zerolinecolor": "white" | |
}, | |
"zaxis": { | |
"backgroundcolor": "#E5ECF6", | |
"gridcolor": "white", | |
"gridwidth": 2, | |
"linecolor": "white", | |
"showbackground": true, | |
"ticks": "", | |
"zerolinecolor": "white" | |
} | |
}, | |
"shapedefaults": { | |
"line": { | |
"color": "#2a3f5f" | |
} | |
}, | |
"ternary": { | |
"aaxis": { | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "" | |
}, | |
"baxis": { | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "" | |
}, | |
"bgcolor": "#E5ECF6", | |
"caxis": { | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "" | |
} | |
}, | |
"title": { | |
"x": 0.05 | |
}, | |
"xaxis": { | |
"automargin": true, | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "", | |
"title": { | |
"standoff": 15 | |
}, | |
"zerolinecolor": "white", | |
"zerolinewidth": 2 | |
}, | |
"yaxis": { | |
"automargin": true, | |
"gridcolor": "white", | |
"linecolor": "white", | |
"ticks": "", | |
"title": { | |
"standoff": 15 | |
}, | |
"zerolinecolor": "white", | |
"zerolinewidth": 2 | |
} | |
} | |
}, | |
"title": { | |
"text": "Grid AUC" | |
}, | |
"width": 900 | |
} | |
}, | |
"text/html": [ | |
"<div>\n", | |
" \n", | |
" \n", | |
" <div id=\"265a5d3f-f0f9-430c-9e9b-1996325e5284\" class=\"plotly-graph-div\" style=\"height:900px; width:900px;\"></div>\n", | |
" <script type=\"text/javascript\">\n", | |
" require([\"plotly\"], function(Plotly) {\n", | |
" window.PLOTLYENV=window.PLOTLYENV || {};\n", | |
" \n", | |
" if (document.getElementById(\"265a5d3f-f0f9-430c-9e9b-1996325e5284\")) {\n", | |
" Plotly.newPlot(\n", | |
" '265a5d3f-f0f9-430c-9e9b-1996325e5284',\n", | |
" [{\"type\": \"surface\", \"x\": [0.05, 0.1, 0.15000000000000002, 0.2, 0.25, 0.3, 0.35000000000000003, 0.4, 0.45, 0.5, 0.55, 0.6000000000000001, 0.6500000000000001, 0.7000000000000001, 0.7500000000000001, 0.8, 0.8500000000000001, 0.9000000000000001, 0.9500000000000001, 1.0], \"y\": [0.0, 0.05, 0.1, 0.15000000000000002, 0.2, 0.25, 0.30000000000000004, 0.35000000000000003, 0.4, 0.45, 0.5, 0.55, 0.6000000000000001, 0.65, 0.7000000000000001, 0.75, 0.8, 0.8500000000000001, 0.9, 0.9500000000000001, 1.0], \"z\": [[0.49999999999999967, 0.7602499389065236, 0.9213503964748576, 0.9830525732376569, 0.9976611325094766, 0.9997965239912774, 0.9999889547515007, 0.9999996284508137, 0.9999999922913709, 0.999999999901692, 0.9999999999992313, 0.9999999999999962, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], [0.5000000000000001, 0.6381631950841188, 0.7602499389065238, 0.8555778168267576, 0.9213503964748576, 0.9614500641282293, 0.9830525732376554, 0.9933358356095914, 0.997661132509477, 0.9992686417066596, 0.9997965239912777, 0.9999496890389403, 0.9999889547515007, 0.9999978486102684, 0.999999628450814, 0.9999999431363719, 0.9999999922913712, 0.9999999990747129, 0.9999999999016921, 0.9999999999907575, 0.9999999999992314], [0.5000000000000088, 0.593168142116613, 0.6813240558830406, 0.760249938906532, 0.8271107069244285, 0.8807035853417912, 0.9213503964748663, 0.9505199229903059, 0.970326780604049, 0.983052573237664, 0.9907889372729594, 0.9952390544079593, 0.9976611325094852, 0.9989084776313276, 0.9995162857748849, 0.9997965239912863, 0.9999187795774154, 0.9999692445548323, 0.9999889547515096, 0.999996238765855, 0.9999987857662722], [0.5000000000000001, 0.5701581024006671, 0.6381631950841189, 0.7020584547174114, 0.7602499389065234, 0.8116204410942092, 0.855577816826758, 0.89203753052993, 0.9213503964748573, 0.9441941158508538, 0.9614500641282291, 0.9740850363910453, 0.9830525732376554, 0.989221866619992, 0.9933358356095916, 0.9959950288350603, 0.9976611325095444, 0.9986729853202589, 0.9992686417066596, 0.9996085308910546, 0.9997965239912776], [0.5000000000000002, 0.5562314580091425, 0.6113512946052393, 0.6643133797295637, 0.7141961775233341, 0.7602499389065235, 0.8019280454239632, 0.8389005969187093, 0.8710504823538304, 0.8984541062114156, 0.9213503964748575, 0.9401025347870411, 0.9551569891148177, 0.9670039724703263, 0.9761425598813247, 0.9830525732376545, 0.9881741916723221, 0.9918952292953873, 0.9945452508178656, 0.9963952146176285, 0.9976611325094767], [0.5, 0.546907192122536, 0.5931681421166043, 0.6381631950841185, 0.6813240558830316, 0.722155104858603, 0.7602499389065234, 0.7953022568950407, 0.8271107069244197, 0.8555778168267574, 0.8807035853417824, 0.9025746756955824, 0.9213503964748574, 0.9372467642812743, 0.9505199229902999, 0.9614500641282293, 0.9703267806040404, 0.9774365255556621, 0.9830525732376555, 0.9874276194133215, 0.9907889372729508], [0.49999999999999994, 0.5402308245930559, 0.580053563364366, 0.6190725068906454, 0.6569160750723805, 0.6932473669360447, 0.7277730113626487, 0.7602499389065233, 0.7904898332328422, 0.8183611695319533, 0.8437888943786533, 0.8667519355212342, 0.8872788415027448, 0.9054419329894567, 0.9213503964748584, 0.9351427661060441, 0.946979223149915, 0.9570340998900255, 0.965488912008272, 0.9725261681064563, 0.9783241243695688], [0.49999999999999994, 0.5352159888611934, 0.5701581024006668, 0.6045588385296877, 0.6381631950841186, 0.670734316750798, 0.7020584547174114, 0.7319490678749666, 0.7602499389065235, 0.786837228307796, 0.811620441094209, 0.834542331443041, 0.8555778168267578, 0.8747320127931812, 0.8920375305299301, 0.9075512005172001, 0.9213503964748577, 0.9335291347174328, 0.944194115850854, 0.9534608598908434, 0.9614500641282293], [0.5000000000000001, 0.5313116488133846, 0.5624307099597985, 0.5931681421166044, 0.6233418880343247, 0.6527800996822031, 0.6813240558830294, 0.7088306904493215, 0.7351746649733255, 0.7602499389065234, 0.7839708094290538, 0.8062724138514069, 0.8271107069244201, 0.846461943551132, 0.8643217132142011, 0.8807035853417825, 0.8956374344123393, 0.9091675196299486, 0.9213503964748577, 0.9322527365266777, 0.941949128009726], [0.5000000000021239, 0.5281859888985089, 0.5562314580091434, 0.5839979857136818, 0.6113512946052403, 0.6381631950841196, 0.6643133797295648, 0.6896910267811561, 0.7141961775233352, 0.7377408598934627, 0.7602499389065243, 0.781661683162556, 0.8019280454239605, 0.8210146636778269, 0.8389005969187103, 0.8555778168267586, 0.8710504823538312, 0.8853340288041773, 0.8984541062114171, 0.9104454036366402, 0.9213503964748584], [0.49999999999999545, 0.5256273301796881, 0.5511490171082739, 0.5764607222152706, 0.6014606894739196, 0.6260509703998948, 0.6501385716516601, 0.6736365028979943, 0.6964647054242615, 0.7185508452597373, 0.7398309583065726, 0.7602499389065196, 0.7797618673594661, 0.7983301759721426, 0.8159276571355447, 0.8325363205853042, 0.8481471102847093, 0.8627594941978852, 0.8763809425241916, 0.8890263117002656, 0.9007171526195924], [0.5000000000000085, 0.5234943022886457, 0.5469071921225481, 0.5701581024006735, 0.5931681421166108, 0.6158608982270898, 0.6381631950841469, 0.6600057988828867, 0.6813240558830703, 0.7020584547174538, 0.7221551048586461, 0.7415661252245749, 0.76024993890653, 0.7781714720441502, 0.7953022568950473, 0.8116204410942156, 0.8271107069244265, 0.8417641060760176, 0.855577816826764, 0.868554831790083, 0.8807035853417888], [0.49999999999995753, 0.5216889041143359, 0.5433137504757136, 0.5648110483522716, 0.5861184326975042, 0.607175206272874, 0.6279228573839521, 0.6483055458842405, 0.668270550744904, 0.6877686732618917, 0.706754590853921, 0.725187157373159, 0.7430296468807803, 0.7602499389064845, 0.7768206442887313, 0.7927191717555949, 0.8079277364305207, 0.8224333124105639, 0.8362275324473918, 0.8493065385414369, 0.861670787945529], [0.5000000000005789, 0.5201410642429275, 0.5402308245936347, 0.5602183688763696, 0.5800535633649445, 0.5996874296452789, 0.6190725068907652, 0.6381631950848705, 0.6569160750731973, 0.6752902017242246, 0.6932473669366235, 0.7107523297477712, 0.7277730113632274, 0.7442806534821956, 0.7602499389071018, 0.7756590740120708, 0.7904898332334203, 0.804727566309795, 0.8183611695325306, 0.8313830227584398, 0.8437888943792299], [0.5000000000000787, 0.518799356469329, 0.5375569906932115, 0.5562314580091571, 0.5747818658438414, 0.5931681421166186, 0.6113512946052537, 0.6292936584800066, 0.6469591293929787, 0.6643133797295782, 0.681324055883046, 0.6979609546963931, 0.7141961775233491, 0.7300042606852354, 0.7453622814379737, 0.7602499389065391, 0.7746496097869489, 0.7885463789523202, 0.8019280454239821, 0.8147851044757406, 0.827110706924443], [0.4999999999998853, 0.517625186933547, 0.5352159888610791, 0.5527382218907755, 0.5701581024005528, 0.5874424423014112, 0.6045588385295744, 0.6214758549659826, 0.6381631950840055, 0.654591863749809, 0.6707343165933685, 0.6865645967659771, 0.7020584547172998, 0.7171934555668006, 0.7319490678748553, 0.7463067366088573, 0.7602499389064107, 0.773764222699658, 0.7868372283076792, 0.7994586932970551, 0.8116204410940836], [0.5000000000003252, 0.5165890276867517, 0.5331493835766484, 0.5496525444545334, 0.5660702829809676, 0.5823748124417204, 0.5985389277093799, 0.6145361412286685, 0.6303408128939554, 0.6459282727605037, 0.6612749356157767, 0.676358406532642, 0.6911575766311675, 0.7056527083882798, 0.7198255099532325, 0.7336591980498607, 0.7471385491722161, 0.7602499389066256, 0.7729813693387327, 0.7853224846269955, 0.7972645749428031], [0.4999999999999982, 0.515667902962286, 0.5313116488133814, 0.5469071921225321, 0.5624307099597944, 0.5778587110055242, 0.5931681421165997, 0.6083364915442685, 0.623341888034322, 0.6381631950841183, 0.6527800996822081, 0.6671731949142812, 0.6813240558830481, 0.6952153084586535, 0.7088306904493654, 0.7221551048586617, 0.7351746649734108, 0.7478767311076697, 0.7602499388692131, 0.7722842191948307, 0.7839708094292899], [0.4999999999964511, 0.5148436677051821, 0.5296667929179351, 0.5444489183870964, 0.5591697567724416, 0.5738092741271763, 0.588347771628151, 0.6027659650555618, 0.6170450613581309, 0.63116683189439, 0.6451136819598939, 0.6588687159301537, 0.6724157978188727, 0.6857396068162097, 0.6988256875109513, 0.711660494535969, 0.7242314314263324, 0.7365268835320993, 0.7485362448757893, 0.7602499389029651, 0.771659433119223], [0.4999999999999333, 0.5141018016520983, 0.5281859888984426, 0.5422350133115468, 0.5562314580090714, 0.570158103871465, 0.583997985713593, 0.5977344689083333, 0.6113512946051114, 0.6248326446648464, 0.6381631950839182, 0.6513281678872662, 0.6643133797292411, 0.6771052869394585, 0.6896910267806402, 0.7020584547167666, 0.7141961775225338, 0.7260935820987153, 0.7377408598922596, 0.7491290268544407, 0.7602499389047835]]}],\n", | |
" {\"autosize\": false, \"height\": 900, \"scene\": {\"xaxis\": {\"title\": {\"text\": \"\\u03bc_ratio\"}}, \"yaxis\": {\"title\": {\"text\": \"\\u03c3\"}}, \"zaxis\": {\"title\": {\"text\": \"AUROC\"}}}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"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.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.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.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.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.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.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.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.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.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.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.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.0, \"#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}, \"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.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.0, \"#f0f921\"]], \"sequentialminus\": [[0.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.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"Grid AUC\"}, \"width\": 900},\n", | |
" {\"responsive\": true}\n", | |
" ).then(function(){\n", | |
" \n", | |
"var gd = document.getElementById('265a5d3f-f0f9-430c-9e9b-1996325e5284');\n", | |
"var x = new MutationObserver(function (mutations, observer) {{\n", | |
" var display = window.getComputedStyle(gd).display;\n", | |
" if (!display || display === 'none') {{\n", | |
" console.log([gd, 'removed!']);\n", | |
" Plotly.purge(gd);\n", | |
" observer.disconnect();\n", | |
" }}\n", | |
"}});\n", | |
"\n", | |
"// Listen for the removal of the full notebook cells\n", | |
"var notebookContainer = gd.closest('#notebook-container');\n", | |
"if (notebookContainer) {{\n", | |
" x.observe(notebookContainer, {childList: true});\n", | |
"}}\n", | |
"\n", | |
"// Listen for the clearing of the current output cell\n", | |
"var outputEl = gd.closest('.output');\n", | |
"if (outputEl) {{\n", | |
" x.observe(outputEl, {childList: true});\n", | |
"}}\n", | |
"\n", | |
" })\n", | |
" };\n", | |
" });\n", | |
" </script>\n", | |
" </div>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"import plotly.graph_objects as go\n", | |
"import plotly\n", | |
"# import chart_studio\n", | |
"# chart_studio.tools.set_credentials_file(username='', api_key='')\n", | |
"\n", | |
"fig = go.Figure(data=[go.Surface(z=aucs.values, x=aucs.index.values, y=aucs.columns.values)])\n", | |
"fig.update_layout(title='Grid AUC', width=900, height=900, autosize=False)\n", | |
"fig.update_layout(scene=dict(xaxis_title=aucs.columns.name, yaxis_title=aucs.index.name, zaxis_title='AUROC'))\n", | |
"\n", | |
"fig.show()\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"hide_input": false, | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.6" | |
}, | |
"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": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment