diff --git a/src/models/desi/desi_evaluate_groups.ipynb b/src/models/desi/desi_evaluate_groups.ipynb index bf1a83d341c939b12ef0437180bf4a9841c830bf..18e5989b6870a67095b367d6731b4141b3f67f97 100644 --- a/src/models/desi/desi_evaluate_groups.ipynb +++ b/src/models/desi/desi_evaluate_groups.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -197,7 +197,7 @@ "4 0.214286 " ] }, - "execution_count": 2, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -212,7 +212,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -245,7 +245,7 @@ "Name: count, dtype: int64" ] }, - "execution_count": 8, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -256,7 +256,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -296,17 +296,15 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "c:\\Users\\desiw\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\plotly\\express\\_core.py:1985: FutureWarning:\n", - "\n", - "When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.\n", - "\n" + "c:\\Users\\desiw\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\plotly\\express\\_core.py:1985: FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.\n", + " sf: grouped.get_group(s if len(s) > 1 else s[0])\n" ] }, { @@ -318,7 +316,7 @@ "data": [ { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "NAB", "NAB", @@ -392,41 +390,41 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1114811464088816, - 0.1277487940730036, - 0.1216352929102622, - 0.1826743887368079, - 0.1027400522352829, - 0.0863785520999006, - 0.1900210818480747, - 0.286935007610574, - 0.1580680200069276, - 0.2266054728160446, - 0.0824833823638343, - 0.0862878799666994, - 0.068930349229141, - 0.1301628009673794, - 0.0997357552561939, - 0.3019649323978445, - 0.1136263903518569, - 0.114881668421924, - 0.1215419564314522, - 0.184724409755758, - 0.1002070301715388, - 0.4162293274911158, - 0.1606410583433255, - 0.3156489022597225, - 0.0959018159169502, - 0.0694482365523221, - 0.1144535283219647, - 0.1214019035323505 + 0.1009451728802645, + 0.1281087100575705, + 0.1171576200895926, + 0.1801663410634695, + 0.1054475887952791, + 0.1000945533148524, + 0.229572485037448, + 0.3180512423146159, + 0.2052935600470548, + 0.3275697849922989, + 0.0976263424093555, + 0.1286854555704182, + 0.1154231208580612, + 0.135970735993591, + 0.1452969361054538, + 0.2020142440611155, + 0.1285669289006825, + 0.1649225823780662, + 0.1183341796225441, + 0.2180093437140324, + 0.1050061429476725, + 0.5043860307495018, + 0.1603726789250824, + 0.3814994439211303, + 0.0948078042240959, + 0.0706866995815033, + 0.1272255626038514, + 0.1532540179078425 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "WSD", "WSD", @@ -494,38 +492,38 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0156099553109553, - 0.0005966348920265, - 0.5621137385914386, - 0.3999925015575123, - 0.0019784484444258, - 0.3340997095879228, - 0.3351756089703754, - 0.2850266636449676, - 0.088698009990802, - 0.0045400576125231, - 0.3930548765661013, - 0.0389981704366677, - 0.0010117170525816, - 0.0614972385801277, - 0.4692431313389204, - 0.3087434797746063, - 0.0025378322401993, - 0.0054371903916583, - 0.841388873875802, - 0.0160994444419026, - 0.334304149222502, - 0.0175155026911261, - 0.1815222708092185, - 0.0061063718333813, - 0.5320208288797212 + 0.0170106820626907, + 0.0019297990875702, + 0.3289886933334722, + 0.3169156592087502, + 0.0057074805886625, + 0.0920549938430992, + 0.1080960438828656, + 0.0447924145930192, + 0.08885672022078, + 0.0288580935851013, + 0.146123475043933, + 0.0602386245242467, + 0.0016414554457349, + 0.0510989353645024, + 0.405994313455163, + 0.2362374731068962, + 0.0118550025956591, + 0.0080398311574946, + 0.5033494239930368, + 0.0450007760709601, + 0.3343905570904966, + 0.0239015768899222, + 0.0673083349839368, + 0.008822837681776, + 0.3195292658968113 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "MSL", "MSL", @@ -561,22 +559,22 @@ "x0": " ", "xaxis": "x", "y": [ - 0.3039945475015764, - 0.2023077223729303, - 0.2719394544247738, - 0.5816577592418987, - 0.0187513705767892, - 0.0618386713514016, - 0.1260780266768607, - 0.1432377785539599, - 0.4271686588299724 + 0.4770503725372645, + 0.3125616228291222, + 0.449583189492551, + 0.5869636536607037, + 0.0336277860578236, + 0.1541427650915253, + 0.1168946312445426, + 0.1664522631786306, + 0.4488749097920018 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Stock", "Stock", @@ -614,23 +612,23 @@ "x0": " ", "xaxis": "x", "y": [ - 0.4986029337714184, - 0.475396475420616, - 0.5431087997851897, - 0.5350510095748872, - 0.5400926111688614, - 0.4954373104486242, - 0.4777315291858331, - 0.541961545979461, - 0.5455604599048302, - 0.5393818844218652 + 0.8965759529008617, + 0.9089323906519592, + 0.948838869832512, + 0.9589962743792236, + 0.4328494430864685, + 0.7750501884996596, + 0.3877266111164842, + 0.9672790059921912, + 0.9839181280772312, + 0.9194281939448028 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Daphnet" ], @@ -650,14 +648,14 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1322337577607795 + 0.1330800298859931 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "MITDB", "MITDB", @@ -691,21 +689,21 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0507139458312757, - 0.3268702492730955, - 0.0518362649808909, - 0.1255949221045285, - 0.0828161324340301, - 0.0359079902999632, - 0.180146074082762, - 0.050641754546515 + 0.0655928375129489, + 0.3130386100168111, + 0.0543050890725851, + 0.165135939901446, + 0.0063751866351832, + 0.0359623856847141, + 0.1900670861628873, + 0.0687029646809657 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SMD", "SMD", @@ -799,51 +797,51 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1739879072639512, - 0.4676583208692023, - 0.624519889926646, - 0.6659190414079911, - 0.2973063568175258, - 0.7369197639658849, - 0.2751382279955706, - 0.6707775056899709, - 0.6338839224024952, - 0.3845771674704322, - 0.104595225917234, - 0.5433968578662134, - 0.2527177732666589, - 0.7332309713918919, - 0.927628230857835, - 0.7126869009961889, - 0.6112770139947741, - 0.8135237501566093, - 0.3784668843234977, - 0.6571303430961545, - 0.5046448037088208, - 0.612443846388914, - 0.4209858532864562, - 0.3432486170500073, - 0.3982632962902694, - 0.5184789964676685, - 0.6291538316376156, - 0.7399945778006759, - 0.2295919594954881, - 0.4663934294305344, - 0.5970841100853315, - 0.5241437325921358, - 0.8454518385201374, - 0.7394118832833682, - 0.4768183520262633, - 0.9692890217588525, - 0.1626725350858836, - 0.6724261191290057 + 0.1301396881205377, + 0.3474840113540728, + 0.5257986229646947, + 0.6636631922043172, + 0.2536320477761474, + 0.7197682250251601, + 0.2791659802622198, + 0.6687671214141642, + 0.5996765487121487, + 0.3995286477341201, + 0.0422854658970998, + 0.4413637094223206, + 0.2705435302234947, + 0.7587660885403003, + 0.8732417587531789, + 0.7031494665121006, + 0.543677847404545, + 0.7779601830933641, + 0.328412458926937, + 0.6568629691953706, + 0.4072720165926265, + 0.527954394349026, + 0.2125495738084413, + 0.2695039115912405, + 0.1382924695744229, + 0.394070383538556, + 0.6311142239103623, + 0.7405254736850734, + 0.0668798751717433, + 0.3382161279609929, + 0.6426028107495327, + 0.5577254241580539, + 0.8273324367923459, + 0.6951842741859796, + 0.3720051923565687, + 0.9193089977317334, + 0.0977050259624144, + 0.5677440953422607 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "LTDB", "LTDB", @@ -879,22 +877,22 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1263362673352569, - 0.1602013675075099, - 0.1305039057205968, - 0.450077386735166, - 0.4497357108799843, - 0.3999137592402245, - 0.2784675765691576, - 0.2308065730870653, - 0.2645752076477775 + 0.1745310394798601, + 0.2119572206742382, + 0.1824113384879606, + 0.5229600423871921, + 0.4875423354527968, + 0.4478031744505809, + 0.3407908860129046, + 0.2882427026472292, + 0.3122169394977651 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "MGAB", "MGAB", @@ -930,22 +928,22 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0222984191676425, - 0.0017818131424542, - 0.061391827756733, - 0.0466341139577001, - 0.0685675121884226, - 0.0345460966063047, - 0.0742777379376246, - 0.0447332083316952, - 0.0585076306656903 + 0.0148171865197386, + 0.0034262528243719, + 0.0411334991689147, + 0.0337630600598233, + 0.0208343607271841, + 0.0224464388718262, + 0.0445006272158276, + 0.0192799765362658, + 0.028571073022964 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SED", "SED", @@ -969,16 +967,16 @@ "x0": " ", "xaxis": "x", "y": [ - 0.036779545854983, - 0.0258856485910954, - 0.0288268357925318 + 0.0639334787833134, + 0.054205806449598, + 0.0515472250881967 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SVDB", "SVDB", @@ -1036,33 +1034,33 @@ "x0": " ", "xaxis": "x", "y": [ - 0.2625413051603978, - 0.122037043958373, - 0.1891400409731513, - 0.1681774513220414, - 0.270687474855342, - 0.0937394912921102, - 0.032985558370704, - 0.1497421083667586, - 0.2453754565185324, - 0.0421354979427216, - 0.1195371178527897, - 0.1772786602964193, - 0.0894529858315303, - 0.1101152022240516, - 0.2039559368016421, - 0.0299078663953853, - 0.1222230227909392, - 0.0419841232950593, - 0.0875448241574165, - 0.0390117897298735 + 0.2608578180184823, + 0.0479930330163953, + 0.1389324911988367, + 0.1765104266632455, + 0.2696789989618128, + 0.0764066827508685, + 0.0407129962395518, + 0.1375436608584624, + 0.2780644784986223, + 0.0660105711629989, + 0.0755634213430318, + 0.1982906350672851, + 0.0969248802762977, + 0.1113259434294397, + 0.220047128837984, + 0.0355460299430414, + 0.137717954262825, + 0.0507594647978935, + 0.0863898571779153, + 0.044494036167939 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "TAO", "TAO", @@ -1086,16 +1084,16 @@ "x0": " ", "xaxis": "x", "y": [ - 0.9917565139263252, - 0.9976220792376168, - 0.9908138358856622 + 0.9991737506737156, + 0.999578788733182, + 0.9863808354522692 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "IOPS", "IOPS", @@ -1147,30 +1145,30 @@ "x0": " ", "xaxis": "x", "y": [ - 0.517523824603947, - 0.3338438662281405, - 0.5123692773117389, - 0.2357208931753029, - 0.0603238578216998, - 0.7893535926609497, - 0.0726161247106597, - 0.1323081858343272, - 0.4958299451519251, - 0.4615416104180114, - 0.0053961253293434, - 0.0673505168943469, - 0.3761510412964243, - 0.1742383786599989, - 0.5486401473211884, - 0.0520672631794141, - 0.6080326913752112 + 0.1292139223142417, + 0.1041920107992168, + 0.258599132749086, + 0.1312432469504681, + 0.0572869585224031, + 0.1499706052023288, + 0.02737698953575, + 0.4030067289145056, + 0.3308258908215797, + 0.4502733441678267, + 0.0372076187622129, + 0.1724029960166536, + 0.2071218824359444, + 0.069556765291795, + 0.4324714670682278, + 0.1400154728828805, + 0.520985124485407 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "NEK", "NEK", @@ -1206,22 +1204,22 @@ "x0": " ", "xaxis": "x", "y": [ - 0.6984350672518377, - 0.2990130230594978, - 0.907080017092832, - 0.2518018174630895, - 0.9409840735007644, - 0.4315836653999498, - 0.770925185334963, - 0.8834973189041614, - 0.8234678240249466 + 0.7102807632294266, + 0.3334684045708462, + 0.9157650591595516, + 0.3051589315084462, + 0.9422113974567448, + 0.4846033976302242, + 0.7900272232210096, + 0.8919818214977273, + 0.833778173180497 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "CATSv2" ], @@ -1241,14 +1239,14 @@ "x0": " ", "xaxis": "x", "y": [ - 0.3580709697520762 + 0.3290558627970383 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "TODS", "TODS", @@ -1296,28 +1294,28 @@ "x0": " ", "xaxis": "x", "y": [ - 0.7358734481839604, - 0.2001661174144549, - 0.1067046209656631, - 0.0767851754314286, - 0.0304365206762823, - 0.3356917331740057, - 0.1836718046484004, - 0.1833445641382529, - 0.0570664027991004, - 0.2424635662092228, - 0.0359492701956271, - 0.0713726691376403, - 0.2646763176777088, - 0.4795585086588033, - 0.0813003969733314 + 0.9320071979104938, + 0.6817648548880137, + 0.619392903434903, + 0.5204081945233773, + 0.7755469160239488, + 0.850948806848277, + 0.3362460442405468, + 0.269815731398083, + 0.1063194707761475, + 0.7664113727834739, + 0.1524278716707837, + 0.425543441129264, + 0.6821353583683741, + 0.5538030827566615, + 0.1606451568561448 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Power" ], @@ -1337,14 +1335,14 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0647879297198734 + 0.0672501040011019 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "UCR", "UCR", @@ -1514,89 +1512,89 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0069772495601362, - 0.0089628765700838, - 0.002085360873248, - 0.0092874228230063, - 0.0027826956397329, - 0.0140700943827261, - 0.0236669703750808, - 0.0252276093548975, - 0.0012433218044805, - 0.0053233842152503, - 0.0053549965544177, - 0.000027156202476645665, - 0.0025079330429226, - 0.0020616445464086, - 0.0039858307506453, - 0.0248088136784361, - 0.095554247824611, - 0.00003782720532607051, - 0.0026951137334356, - 0.0051806020407553, - 0.0041930142221083, - 0.0014826083538777, - 0.0003014299837117, - 0.0016902039504813, - 0.018162606726345, - 0.0056202009379987, - 0.1005017225858331, - 0.0245840986173165, - 0.0102108814534344, - 0.0107803577975623, - 0.0421412375559872, - 0.0075686574388029, - 0.0119069993728264, - 0.0216676202078908, - 0.024112839096339, - 0.016191589285874, - 0.0188639187733665, - 0.0005376344086021, - 0.2000555643002249, - 0.0206157791516667, - 0.0041002343650395, - 0.0123603724617433, - 0.0236290402075518, - 0.0934941480180631, - 0.0027344193641158, - 0.2210698349478332, - 0.0065626260507514, - 0.0627698530583293, - 0.0015140229641193, - 0.0072011260923108, - 0.0045213544254887, - 0.0052409194344367, - 0.0163693604698666, - 0.000010053383466205551, - 0.005073159008011, - 0.217768873403919, - 0.0313694375683062, - 0.0003916022129999, - 0.0071265945027821, - 0.0052386204990606, - 0.0032186947547318, - 0.0040000919106813, - 0.0047495419954748, - 0.3663107886170949, - 0.0243791919211999, - 0.0052815393014724, - 0.0004901960784313, - 0.0109932460560662, - 0.0096875403325463, - 0.0175160862825493, - 0.0218929769298662, - 0.0029654217291781, - 0.0023312607914157, - 0.0014045530085647, - 0.0272440205863137, - 0.1171007739930341 + 0.0080299323956759, + 0.0182652884159213, + 0.0028900187419194, + 0.018486118989619, + 0.0039854294752767, + 0.0151721594300285, + 0.0243926676196308, + 0.0469868494632676, + 0.0024615293571285, + 0.0091265899501076, + 0.0058955675962032, + 0.00006053279185387088, + 0.0495206182219899, + 0.0021599206905477, + 0.0058663897407834, + 0.0304629514617418, + 0.0639309996599823, + 0.00008414640990882806, + 0.0084322760288868, + 0.0057403793263342, + 0.0143623240874908, + 0.0020448830450455, + 0.0004840373182322, + 0.0017389598091735, + 0.0277317366238642, + 0.0097335118747167, + 0.0621575443241051, + 0.0277060841804476, + 0.0159630000168175, + 0.0109862651944141, + 0.0263706776415402, + 0.0079180259277135, + 0.0127000954119437, + 0.0222489995913749, + 0.0286933181186042, + 0.0181300488565233, + 0.0208631666790229, + 0.0005336179295624, + 0.2365658169178449, + 0.0217946712515375, + 0.0050280975742233, + 0.0139700042528241, + 0.0379822301000884, + 0.0541519770570237, + 0.0155534047178474, + 0.0642889328803235, + 0.0071695663293138, + 0.0880669616041549, + 0.0019714632129438, + 0.0099385068762042, + 0.0053497716464245, + 0.0095561182792424, + 0.0200757261096892, + 0.000023276211473169568, + 0.0057121500430497, + 0.1221932752848065, + 0.0240926266871147, + 0.0005886811704286, + 0.0075247624900853, + 0.0058088160191489, + 0.0043128186701722, + 0.0082740130286173, + 0.0054899959247079, + 0.1548828663802889, + 0.0253602187027208, + 0.0061773476406007, + 0.0004828585224529, + 0.0119420253971059, + 0.010976253454825, + 0.0186335132695865, + 0.0218031182652742, + 0.0061357098182757, + 0.0043013466104279, + 0.001544285790348, + 0.0581359245123009, + 0.0420725446673419 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SMAP", "SMAP", @@ -1652,32 +1650,32 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1064141594909105, - 0.1586330208395241, - 0.6928206787179723, - 0.6883065138679298, - 0.8310728814944762, - 0.4882922185199669, - 0.1916384457245993, - 0.4213334762375586, - 0.0116975184264404, - 0.0936881522023821, - 0.177577983258983, - 0.3571644395302697, - 0.0734719949874024, - 0.0425459882060301, - 0.4609170649354331, - 0.0168684435671792, - 0.43220679467126, - 0.0076014630121591, - 0.0454632353418692 + 0.024930795889296, + 0.1589354521744285, + 0.6951000478101532, + 0.866458293342961, + 0.8331202890526553, + 0.6345266031656472, + 0.1910676568559934, + 0.4024225693233234, + 0.0155649896135518, + 0.0769231553249308, + 0.1800385538390924, + 0.0753315761848947, + 0.0632661929603659, + 0.0307328366908919, + 0.43440063160702, + 0.0185401333172043, + 0.4307481466781108, + 0.0149884248855262, + 0.043960843841344 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SWaT" ], @@ -1697,14 +1695,14 @@ "x0": " ", "xaxis": "x", "y": [ - 0.7376946947277406 + 0.669824054008361 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "YAHOO", "YAHOO", @@ -1792,48 +1790,48 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0666666666666666, - 1, - 0.0042068284976138, - 0.0289201496901289, - 0.0007806401249024, - 1, - 0.1833971088435373, - 0.0055340860221973, + 0.0555555555555554, 1, + 0.0385304738255251, + 0.0363250897073417, + 0.0187091483351984, 1, - 0.0005970149253731, - 0.000653167864141, + 0.1661153922908229, + 0.0259048926628198, + 0.8641975308641974, + 0.8595679012345676, + 0.0187020206429116, + 0.018984591887015, 1, - 0.001841620626151, - 0.0269574796955106, - 0.0151515151515151, + 0.0046159697773407, + 0.0317230767406775, + 0.0147058823529411, 1, 1, 1, - 0.001082251082251, + 0.0032121891621152, 1, - 0.2, - 0.5007007708479327, + 0.1428571428571428, + 0.321546024210809, 1, + 0.6868864670348196, + 0.2524721458826821, + 0.9785160868647084, + 0.008758599434911, 1, - 0.6122207534699272, - 0.9775786665471188, - 0.0059312282126781, - 1, - 0.0056397402301469, - 0.5, - 0.0018018018018018, - 0.0009372071227741, - 0.0010384215991692, - 0.3968689642799195 + 0.0066201863458979, + 0.2106145973830484, + 0.0020027839671379, + 0.1015397729488557, + 0.01982046042404, + 0.7210798027039079 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Exathlon", "Exathlon", @@ -1915,45 +1913,45 @@ "x0": " ", "xaxis": "x", "y": [ - 0.5535551120261957, - 0.9544025346025836, - 0.5801034660636765, - 0.066703245894172, - 0.9053131320367996, - 0.5735701881516397, - 0.8339883324471311, - 0.7021607022176044, - 0.9768759991505862, - 0.9583879186638148, - 0.8235144451712874, - 0.948377506556802, - 0.4923757439345692, - 0.992970255730044, - 0.8268523810515537, - 0.9131004008070718, - 0.8235144520346078, - 0.8074206554152196, - 0.8794038096452736, - 0.8339883870933744, - 0.9421833305020378, - 0.823514486350622, - 0.8339890589871864, - 0.6037584056717167, - 0.8235144657959571, - 0.0678573456146895, - 0.5757234711948978, - 0.0433941250304429, - 0.7015421886073693, - 0.8339889889097695, - 0.8279877998780905, - 0.959953084390605 + 0.5542613566842086, + 0.9531920552157612, + 0.5822725756128825, + 0.0682177850526483, + 0.9034952057180936, + 0.5759233997982274, + 0.8334444341433129, + 0.7106923726385336, + 0.9814719667278226, + 0.9603513105414376, + 0.8227837167698208, + 0.9484089864677396, + 0.4982118308026251, + 0.9962598714684814, + 0.8250378327415824, + 0.9119413930720368, + 0.8227837167698208, + 0.8050693311176673, + 0.8822675522555768, + 0.8334442425849976, + 0.9419977524040856, + 0.8227837167698208, + 0.833443729001349, + 0.6057532707984497, + 0.8227837167698208, + 0.0687846632659852, + 0.5783764293709797, + 0.0498103041175154, + 0.7098845120370701, + 0.8334442425849976, + 0.826462469593118, + 0.965047653373962 ], "y0": " ", "yaxis": "y" }, { "alignmentgroup": "True", - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "OPPORTUNITY", "OPPORTUNITY", @@ -2027,34 +2025,34 @@ "x0": " ", "xaxis": "x", "y": [ - 0.8338482606401906, - 0.1031266032308773, - 0.9718491015673606, - 0.7031996296863017, - 0.4945030819575546, - 0.0663959124172727, - 0.0111357415519349, - 0.0125630075305213, - 0.776982310427042, - 0.0191787227930912, - 0.9178179727951572, - 0.95806896324386, - 0.9593104589769668, - 0.5265193865399211, - 0.7627048831680108, - 0.625724963271805, - 0.6557889742764019, - 0.0150569742739803, - 0.964420857540949, - 0.0186878621532751, - 0.914291235318628, - 0.9977372114715984, - 0.0151934393373235, - 0.0190607721577046, - 0.7597120203035821, - 0.5187870275682767, - 0.8095612578614829, - 0.843748197767318 + 0.9127722414391056, + 0.1064474699983355, + 0.9708542809813376, + 0.7515870206893343, + 0.5100187118489438, + 0.0683635597174668, + 0.0126849291325253, + 0.0135167882658251, + 0.8146009411580667, + 0.0204338490710855, + 0.9653797242887892, + 0.9632987626995722, + 0.9745536964616012, + 0.5427194750107045, + 0.7792281190314674, + 0.6931910397490794, + 0.6585099177089323, + 0.0168869636509617, + 0.9753945780813444, + 0.0206942972017477, + 0.9477772157758838, + 0.9976635138666508, + 0.0167951660583179, + 0.0201098826188157, + 0.7892388611946484, + 0.5220683014942072, + 0.8490685089085376, + 0.8717597131009235 ], "y0": " ", "yaxis": "y" @@ -2684,7 +2682,7 @@ 1 ], "title": { - "text": "AUC-PR" + "text": "VUS-PR" } } } @@ -2696,7 +2694,7 @@ ], "source": [ "#Boxplot\n", - "metric = 'AUC-PR'\n", + "metric = 'VUS-PR'\n", "fig = px.box(df, x = 'group',y=metric, color='group',color_discrete_map= colors,hover_name=\"group\", hover_data=[\"group\"])\n", "fig.update_layout( \n", " template = 'ggplot2',\n", @@ -2727,7 +2725,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -2925,7 +2923,7 @@ "9 Sequenzeanomalie " ] }, - "execution_count": 49, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -2940,7 +2938,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -3000,7 +2998,7 @@ "NAB" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "NAB", "NAB", @@ -3042,18 +3040,18 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1114811464088816, - 0.1216352929102622, - 0.0863785520999006, - 0.1900210818480747, - 0.2266054728160446, - 0.068930349229141, - 0.3019649323978445, - 0.114881668421924, - 0.1215419564314522, - 0.1002070301715388, - 0.4162293274911158, - 0.0959018159169502 + 0.1009451728802645, + 0.1171576200895926, + 0.1000945533148524, + 0.229572485037448, + 0.3275697849922989, + 0.1154231208580612, + 0.2020142440611155, + 0.1649225823780662, + 0.1183341796225441, + 0.1050061429476725, + 0.5043860307495018, + 0.0948078042240959 ], "y0": " ", "yaxis": "y" @@ -3110,7 +3108,7 @@ "WSD" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "WSD", "WSD", @@ -3160,22 +3158,22 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0156099553109553, - 0.0019784484444258, - 0.3340997095879228, - 0.3351756089703754, - 0.0045400576125231, - 0.0389981704366677, - 0.0010117170525816, - 0.0614972385801277, - 0.4692431313389204, - 0.3087434797746063, - 0.0025378322401993, - 0.0054371903916583, - 0.841388873875802, - 0.0160994444419026, - 0.0175155026911261, - 0.0061063718333813 + 0.0170106820626907, + 0.0057074805886625, + 0.0920549938430992, + 0.1080960438828656, + 0.0288580935851013, + 0.0602386245242467, + 0.0016414554457349, + 0.0510989353645024, + 0.405994313455163, + 0.2362374731068962, + 0.0118550025956591, + 0.0080398311574946, + 0.5033494239930368, + 0.0450007760709601, + 0.0239015768899222, + 0.008822837681776 ], "y0": " ", "yaxis": "y" @@ -3193,7 +3191,7 @@ "MSL" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "MSL", "MSL", @@ -3217,9 +3215,9 @@ "x0": " ", "xaxis": "x", "y": [ - 0.2023077223729303, - 0.1432377785539599, - 0.4271686588299724 + 0.3125616228291222, + 0.1664522631786306, + 0.4488749097920018 ], "y0": " ", "yaxis": "y" @@ -3258,7 +3256,7 @@ "Stock" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Stock", "Stock", @@ -3296,16 +3294,16 @@ "x0": " ", "xaxis": "x", "y": [ - 0.4986029337714184, - 0.475396475420616, - 0.5431087997851897, - 0.5350510095748872, - 0.5400926111688614, - 0.4954373104486242, - 0.4777315291858331, - 0.541961545979461, - 0.5455604599048302, - 0.5393818844218652 + 0.8965759529008617, + 0.9089323906519592, + 0.948838869832512, + 0.9589962743792236, + 0.4328494430864685, + 0.7750501884996596, + 0.3877266111164842, + 0.9672790059921912, + 0.9839181280772312, + 0.9194281939448028 ], "y0": " ", "yaxis": "y" @@ -3317,7 +3315,7 @@ "Daphnet" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Daphnet" ], @@ -3337,7 +3335,7 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1322337577607795 + 0.1330800298859931 ], "y0": " ", "yaxis": "y" @@ -3370,7 +3368,7 @@ "MITDB" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "MITDB", "MITDB", @@ -3404,14 +3402,14 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0507139458312757, - 0.3268702492730955, - 0.0518362649808909, - 0.1255949221045285, - 0.0828161324340301, - 0.0359079902999632, - 0.180146074082762, - 0.050641754546515 + 0.0655928375129489, + 0.3130386100168111, + 0.0543050890725851, + 0.165135939901446, + 0.0063751866351832, + 0.0359623856847141, + 0.1900670861628873, + 0.0687029646809657 ], "y0": " ", "yaxis": "y" @@ -3462,7 +3460,7 @@ "SMD" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SMD", "SMD", @@ -3508,20 +3506,20 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1739879072639512, - 0.6659190414079911, - 0.2973063568175258, - 0.6707775056899709, - 0.3845771674704322, - 0.7332309713918919, - 0.3784668843234977, - 0.6571303430961545, - 0.4209858532864562, - 0.3432486170500073, - 0.5184789964676685, - 0.6291538316376156, - 0.4663934294305344, - 0.5970841100853315 + 0.1301396881205377, + 0.6636631922043172, + 0.2536320477761474, + 0.6687671214141642, + 0.3995286477341201, + 0.7587660885403003, + 0.328412458926937, + 0.6568629691953706, + 0.2125495738084413, + 0.2695039115912405, + 0.394070383538556, + 0.6311142239103623, + 0.3382161279609929, + 0.6426028107495327 ], "y0": " ", "yaxis": "y" @@ -3557,7 +3555,7 @@ "LTDB" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "LTDB", "LTDB", @@ -3593,15 +3591,15 @@ "x0": " ", "xaxis": "x", "y": [ - 0.1263362673352569, - 0.1602013675075099, - 0.1305039057205968, - 0.450077386735166, - 0.4497357108799843, - 0.3999137592402245, - 0.2784675765691576, - 0.2308065730870653, - 0.2645752076477775 + 0.1745310394798601, + 0.2119572206742382, + 0.1824113384879606, + 0.5229600423871921, + 0.4875423354527968, + 0.4478031744505809, + 0.3407908860129046, + 0.2882427026472292, + 0.3122169394977651 ], "y0": " ", "yaxis": "y" @@ -3637,7 +3635,7 @@ "MGAB" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "MGAB", "MGAB", @@ -3673,15 +3671,15 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0222984191676425, - 0.0017818131424542, - 0.061391827756733, - 0.0466341139577001, - 0.0685675121884226, - 0.0345460966063047, - 0.0742777379376246, - 0.0447332083316952, - 0.0585076306656903 + 0.0148171865197386, + 0.0034262528243719, + 0.0411334991689147, + 0.0337630600598233, + 0.0208343607271841, + 0.0224464388718262, + 0.0445006272158276, + 0.0192799765362658, + 0.028571073022964 ], "y0": " ", "yaxis": "y" @@ -3699,7 +3697,7 @@ "SED" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SED", "SED", @@ -3723,9 +3721,9 @@ "x0": " ", "xaxis": "x", "y": [ - 0.036779545854983, - 0.0258856485910954, - 0.0288268357925318 + 0.0639334787833134, + 0.054205806449598, + 0.0515472250881967 ], "y0": " ", "yaxis": "y" @@ -3791,7 +3789,7 @@ "SVDB" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SVDB", "SVDB", @@ -3847,25 +3845,25 @@ "x0": " ", "xaxis": "x", "y": [ - 0.2625413051603978, - 0.1891400409731513, - 0.1681774513220414, - 0.270687474855342, - 0.0937394912921102, - 0.032985558370704, - 0.1497421083667586, - 0.2453754565185324, - 0.0421354979427216, - 0.1195371178527897, - 0.1772786602964193, - 0.0894529858315303, - 0.1101152022240516, - 0.2039559368016421, - 0.0299078663953853, - 0.1222230227909392, - 0.0419841232950593, - 0.0875448241574165, - 0.0390117897298735 + 0.2608578180184823, + 0.1389324911988367, + 0.1765104266632455, + 0.2696789989618128, + 0.0764066827508685, + 0.0407129962395518, + 0.1375436608584624, + 0.2780644784986223, + 0.0660105711629989, + 0.0755634213430318, + 0.1982906350672851, + 0.0969248802762977, + 0.1113259434294397, + 0.220047128837984, + 0.0355460299430414, + 0.137717954262825, + 0.0507594647978935, + 0.0863898571779153, + 0.044494036167939 ], "y0": " ", "yaxis": "y" @@ -3880,7 +3878,7 @@ "TAO" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "TAO", "TAO" @@ -3902,8 +3900,8 @@ "x0": " ", "xaxis": "x", "y": [ - 0.9976220792376168, - 0.9908138358856622 + 0.999578788733182, + 0.9863808354522692 ], "y0": " ", "yaxis": "y" @@ -3927,7 +3925,7 @@ "IOPS" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "IOPS", "IOPS", @@ -3955,11 +3953,11 @@ "x0": " ", "xaxis": "x", "y": [ - 0.3338438662281405, - 0.0603238578216998, - 0.7893535926609497, - 0.1323081858343272, - 0.4615416104180114 + 0.1041920107992168, + 0.0572869585224031, + 0.1499706052023288, + 0.4030067289145056, + 0.4502733441678267 ], "y0": " ", "yaxis": "y" @@ -3980,7 +3978,7 @@ "NEK" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "NEK", "NEK", @@ -4006,10 +4004,10 @@ "x0": " ", "xaxis": "x", "y": [ - 0.6984350672518377, - 0.4315836653999498, - 0.770925185334963, - 0.8234678240249466 + 0.7102807632294266, + 0.4846033976302242, + 0.7900272232210096, + 0.833778173180497 ], "y0": " ", "yaxis": "y" @@ -4021,7 +4019,7 @@ "CATSv2" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "CATSv2" ], @@ -4041,7 +4039,7 @@ "x0": " ", "xaxis": "x", "y": [ - 0.3580709697520762 + 0.3290558627970383 ], "y0": " ", "yaxis": "y" @@ -4077,7 +4075,7 @@ "TODS" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "TODS", "TODS", @@ -4113,15 +4111,15 @@ "x0": " ", "xaxis": "x", "y": [ - 0.7358734481839604, - 0.0304365206762823, - 0.3356917331740057, - 0.1836718046484004, - 0.1833445641382529, - 0.0570664027991004, - 0.0359492701956271, - 0.4795585086588033, - 0.0813003969733314 + 0.9320071979104938, + 0.7755469160239488, + 0.850948806848277, + 0.3362460442405468, + 0.269815731398083, + 0.1063194707761475, + 0.1524278716707837, + 0.5538030827566615, + 0.1606451568561448 ], "y0": " ", "yaxis": "y" @@ -4133,7 +4131,7 @@ "Power" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Power" ], @@ -4153,7 +4151,7 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0647879297198734 + 0.0672501040011019 ], "y0": " ", "yaxis": "y" @@ -4177,7 +4175,7 @@ "UCR" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "UCR", "UCR", @@ -4205,11 +4203,11 @@ "x0": " ", "xaxis": "x", "y": [ - 0.000027156202476645665, - 0.00003782720532607051, - 0.0005376344086021, - 0.000010053383466205551, - 0.0004901960784313 + 0.00006053279185387088, + 0.00008414640990882806, + 0.0005336179295624, + 0.000023276211473169568, + 0.0004828585224529 ], "y0": " ", "yaxis": "y" @@ -4224,7 +4222,7 @@ "SMAP" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SMAP", "SMAP" @@ -4246,8 +4244,8 @@ "x0": " ", "xaxis": "x", "y": [ - 0.4213334762375586, - 0.0454632353418692 + 0.4024225693233234, + 0.043960843841344 ], "y0": " ", "yaxis": "y" @@ -4259,7 +4257,7 @@ "SWaT" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "SWaT" ], @@ -4279,7 +4277,7 @@ "x0": " ", "xaxis": "x", "y": [ - 0.7376946947277406 + 0.669824054008361 ], "y0": " ", "yaxis": "y" @@ -4390,7 +4388,7 @@ "YAHOO" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "YAHOO", "YAHOO", @@ -4476,40 +4474,40 @@ "x0": " ", "xaxis": "x", "y": [ - 0.0666666666666666, + 0.0555555555555554, 1, - 0.0042068284976138, - 0.0289201496901289, - 0.0007806401249024, + 0.0385304738255251, + 0.0363250897073417, + 0.0187091483351984, 1, - 0.1833971088435373, - 0.0055340860221973, + 0.1661153922908229, + 0.0259048926628198, + 0.8641975308641974, + 0.8595679012345676, + 0.0187020206429116, + 0.018984591887015, 1, + 0.0046159697773407, + 0.0317230767406775, + 0.0147058823529411, 1, - 0.0005970149253731, - 0.000653167864141, 1, - 0.001841620626151, - 0.0269574796955106, - 0.0151515151515151, 1, + 0.0032121891621152, 1, + 0.1428571428571428, + 0.321546024210809, 1, - 0.001082251082251, + 0.6868864670348196, + 0.2524721458826821, + 0.9785160868647084, + 0.008758599434911, 1, - 0.2, - 0.5007007708479327, - 1, - 1, - 0.6122207534699272, - 0.9775786665471188, - 0.0059312282126781, - 1, - 0.0056397402301469, - 0.5, - 0.0018018018018018, - 0.0009372071227741, - 0.0010384215991692 + 0.0066201863458979, + 0.2106145973830484, + 0.0020027839671379, + 0.1015397729488557, + 0.01982046042404 ], "y0": " ", "yaxis": "y" @@ -4614,7 +4612,7 @@ "Exathlon" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "Exathlon", "Exathlon", @@ -4696,38 +4694,38 @@ "x0": " ", "xaxis": "x", "y": [ - 0.5535551120261957, - 0.9544025346025836, - 0.5801034660636765, - 0.066703245894172, - 0.9053131320367996, - 0.5735701881516397, - 0.8339883324471311, - 0.7021607022176044, - 0.9768759991505862, - 0.9583879186638148, - 0.8235144451712874, - 0.948377506556802, - 0.4923757439345692, - 0.992970255730044, - 0.8268523810515537, - 0.9131004008070718, - 0.8235144520346078, - 0.8074206554152196, - 0.8794038096452736, - 0.8339883870933744, - 0.9421833305020378, - 0.823514486350622, - 0.8339890589871864, - 0.6037584056717167, - 0.8235144657959571, - 0.0678573456146895, - 0.5757234711948978, - 0.0433941250304429, - 0.7015421886073693, - 0.8339889889097695, - 0.8279877998780905, - 0.959953084390605 + 0.5542613566842086, + 0.9531920552157612, + 0.5822725756128825, + 0.0682177850526483, + 0.9034952057180936, + 0.5759233997982274, + 0.8334444341433129, + 0.7106923726385336, + 0.9814719667278226, + 0.9603513105414376, + 0.8227837167698208, + 0.9484089864677396, + 0.4982118308026251, + 0.9962598714684814, + 0.8250378327415824, + 0.9119413930720368, + 0.8227837167698208, + 0.8050693311176673, + 0.8822675522555768, + 0.8334442425849976, + 0.9419977524040856, + 0.8227837167698208, + 0.833443729001349, + 0.6057532707984497, + 0.8227837167698208, + 0.0687846632659852, + 0.5783764293709797, + 0.0498103041175154, + 0.7098845120370701, + 0.8334442425849976, + 0.826462469593118, + 0.965047653373962 ], "y0": " ", "yaxis": "y" @@ -4775,7 +4773,7 @@ "OPPORTUNITY" ] ], - "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>AUC-PR=%{y}<extra></extra>", + "hovertemplate": "<b>%{hovertext}</b><br><br>group=%{customdata[0]}<br>anomaly=%{x}<br>VUS-PR=%{y}<extra></extra>", "hovertext": [ "OPPORTUNITY", "OPPORTUNITY", @@ -4819,19 +4817,19 @@ "x0": " ", "xaxis": "x", "y": [ - 0.9718491015673606, - 0.4945030819575546, - 0.0111357415519349, - 0.0125630075305213, - 0.9178179727951572, - 0.9593104589769668, - 0.625724963271805, - 0.0186878621532751, - 0.914291235318628, - 0.0190607721577046, - 0.5187870275682767, - 0.8095612578614829, - 0.843748197767318 + 0.9708542809813376, + 0.5100187118489438, + 0.0126849291325253, + 0.0135167882658251, + 0.9653797242887892, + 0.9745536964616012, + 0.6931910397490794, + 0.0206942972017477, + 0.9477772157758838, + 0.0201098826188157, + 0.5220683014942072, + 0.8490685089085376, + 0.8717597131009235 ], "y0": " ", "yaxis": "y" @@ -5435,7 +5433,7 @@ 1 ], "title": { - "text": "AUC-PR" + "text": "VUS-PR" } } } @@ -5447,7 +5445,7 @@ ], "source": [ "#Boxplot for anomalies\n", - "metric = 'AUC-PR'\n", + "metric = 'VUS-PR'\n", "fig = px.box(df_anomaly, x = 'anomaly',y=metric, color='group',color_discrete_map= colors,hover_name=\"group\", hover_data=[\"group\"])\n", "fig.update_layout( \n", " template = 'ggplot2',\n", @@ -5469,6 +5467,122 @@ "fig.show()" ] }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " duration AUC-PR AUC-ROC VUS-PR VUS-ROC Standard-F1 \\\n", + "group \n", + "CATSv2 70.652527 0.358071 0.671672 0.329056 0.694311 0.426442 \n", + "Daphnet 26.989239 0.132234 0.418213 0.133080 0.427408 0.236743 \n", + "Exathlon 26.784657 0.733875 0.839358 0.735253 0.844099 0.759256 \n", + "IOPS 28.707300 0.320195 0.764905 0.213044 0.838156 0.389598 \n", + "LTDB 63.727441 0.276735 0.569772 0.329828 0.658579 0.341555 \n", + "MGAB 36.815743 0.045860 0.571003 0.025419 0.780171 0.120355 \n", + "MITDB 240.941847 0.113066 0.575368 0.112398 0.648662 0.156766 \n", + "MSL 2.516762 0.237442 0.623682 0.305128 0.702196 0.346157 \n", + "NAB 4.075609 0.153306 0.504177 0.173732 0.561732 0.240700 \n", + "NEK 0.899027 0.667421 0.845031 0.689697 0.898101 0.683098 \n", + "OPPORTUNITY 6.970732 0.545535 0.678946 0.563772 0.683432 0.624304 \n", + "Power 27.608061 0.064788 0.359705 0.067250 0.373181 0.157935 \n", + "SED 19.483207 0.030497 0.366075 0.056562 0.546872 0.083031 \n", + "SMAP 3.499126 0.278827 0.662888 0.273214 0.717289 0.350976 \n", + "SMD 6.188577 0.539890 0.821128 0.483944 0.858948 0.582395 \n", + "SVDB 61.223802 0.129879 0.633003 0.127489 0.702458 0.178644 \n", + "SWaT 128.076170 0.737695 0.828700 0.669824 0.820193 0.790613 \n", + "Stock 295.751233 0.519232 0.488192 0.817960 0.906313 0.653335 \n", + "TAO 163.842410 0.993397 0.996664 0.995044 0.999209 0.994867 \n", + "TODS 10.916495 0.205671 0.532069 0.522228 0.816347 0.257129 \n", + "UCR 37.781606 0.028041 0.605540 0.023293 0.679216 0.055109 \n", + "WSD 10.785602 0.209492 0.697083 0.130270 0.823629 0.273168 \n", + "YAHOO 1.763641 0.443957 0.728624 0.417416 0.871581 0.473548 \n", + "\n", + " PA-F1 Event-based-F1 R-based-F1 Affiliation-F Recall \\\n", + "group \n", + "CATSv2 0.505051 0.100000 0.030394 0.677806 0.010608 \n", + "Daphnet 0.992255 0.778325 0.309125 0.923358 0.061145 \n", + "Exathlon 0.953842 0.921167 0.460834 0.960718 0.148109 \n", + "IOPS 0.713355 0.640416 0.390190 0.856602 0.216378 \n", + "LTDB 0.843457 0.640913 0.281689 0.813421 0.034194 \n", + "MGAB 0.501671 0.368894 0.183225 0.765091 0.108175 \n", + "MITDB 0.865574 0.510863 0.192051 0.817963 0.050266 \n", + "MSL 0.821691 0.679834 0.386690 0.895687 0.088714 \n", + "NAB 0.935755 0.721129 0.413728 0.859832 0.029048 \n", + "NEK 0.985692 0.952862 0.470029 0.949782 0.164960 \n", + "OPPORTUNITY 0.732896 0.673800 0.414382 0.915580 0.353342 \n", + "Power 0.776197 0.157921 0.240411 0.678766 0.000667 \n", + "SED 0.078859 0.078859 0.015015 0.669603 0.000000 \n", + "SMAP 0.828653 0.808116 0.381508 0.948423 0.129299 \n", + "SMD 0.976127 0.941175 0.439749 0.956396 0.311674 \n", + "SVDB 0.913646 0.690670 0.245988 0.853885 0.071883 \n", + "SWaT 0.937086 0.793675 0.239082 0.719987 0.654887 \n", + "Stock 0.691291 0.672879 0.656718 0.687735 0.242005 \n", + "TAO 0.994872 0.994897 0.995514 0.996286 0.451029 \n", + "TODS 0.548961 0.377087 0.359258 0.724617 0.047110 \n", + "UCR 0.413236 0.181246 0.109963 0.802254 0.055210 \n", + "WSD 0.581095 0.509569 0.288492 0.863097 0.201021 \n", + "YAHOO 0.481749 0.479901 0.489514 0.868692 0.454894 \n", + "\n", + " Precision \n", + "group \n", + "CATSv2 1.000000 \n", + "Daphnet 0.582645 \n", + "Exathlon 0.834452 \n", + "IOPS 0.494514 \n", + "LTDB 0.420027 \n", + "MGAB 0.022300 \n", + "MITDB 0.388797 \n", + "MSL 0.497302 \n", + "NAB 0.402316 \n", + "NEK 1.000000 \n", + "OPPORTUNITY 0.422735 \n", + "Power 0.028571 \n", + "SED 0.000000 \n", + "SMAP 0.566717 \n", + "SMD 0.871311 \n", + "SVDB 0.413539 \n", + "SWaT 0.996935 \n", + "Stock 0.693638 \n", + "TAO 0.663512 \n", + "TODS 0.420484 \n", + "UCR 0.014105 \n", + "WSD 0.415571 \n", + "YAHOO 0.265364 \n" + ] + } + ], + "source": [ + "# Mean pro gruppe\n", + "numerical_df = df.select_dtypes(include=['number'])\n", + "mean_groups = df.groupby('group')[numerical_df.columns].mean()\n", + "print(mean_groups)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gesamtdauer Training in s: 13171.054, in min: 219.518, in h: 36.586\n", + "Durchschnittliches Training pro Datei in s: 33.17645774320031\n" + ] + } + ], + "source": [ + "duration = df['duration'].sum()\n", + "print(f'Gesamtdauer Training in s: {duration:.3f}, in min: {(duration/60):.3f}, in h: {(duration/360):.3f}')\n", + "print(f'Durchschnittliches Training pro Datei in s: {(duration / df.shape[0]):.3f}')" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/src/template_evaluate_groups.ipynb b/src/template_evaluate_groups.ipynb index 4a78777cc0c33c7e78355e4eca4870ea415ef827..d1ab6bf63329d3340d1333c2330aa7a507460d0d 100644 --- a/src/template_evaluate_groups.ipynb +++ b/src/template_evaluate_groups.ipynb @@ -5430,7 +5430,23 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "duration = df['duration'].sum()\n", + "print(f'Gesamtdauer Training in s: {duration:.3f}, in min: {(duration/60):.3f}, in h: {(duration/360):.3f}')\n", + "print(f'Durchschnittliches Training pro Datei in s: {(duration / df.shape[0]):.3f}')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Mean der Metriken pro gruppe\n", + "numerical_df = df.select_dtypes(include=['number'])\n", + "mean_groups = df.groupby('group')[numerical_df.columns].mean()\n", + "print(mean_groups)" + ] } ], "metadata": {