[61817.0, 59653.0, 58224.0, 57376.0, 60684.0, 56571.0, 59274.0, 59700.0, 59528.0, 59120.0], [62291.0, 60777.0, 63579.0, 63523.0, 61476.0, 64692.0, 62214.0, 63217.0, 64131.0, 63362.0] ] values[labels[4]] = [ [32298.0, 32298.0, 32298.0, 32298.0, 32298.0, 32298.0, 32298.0, 32298.0, 32298.0, 32298.0], [46991.0, 46991.0, 46991.0, 46991.0, 46991.0, 46991.0, 46991.0, 46991.0, 46991.0, 46991.0], [54865.0, 54753.0, 55205.0, 54765.0, 54848.0, 54856.0, 54868.0, 54856.0, 55034.0, 54874.0], [61132.0, 61040.0, 61059.0, 61022.0, 61040.0, 60889.0, 60877.0, 61059.0, 61040.0, 61040.0], [70200.0, 70440.0, 69966.0, 70183.0, 70490.0, 70400.0, 70038.0, 70216.0, 70423.0, 70328.0], [79718.0, 79090.0, 79401.0, 79561.0, 79718.0, 79529.0, 79344.0, 79529.0, 79684.0, 79731.0], [83669.0, 83906.0, 83868.0, 83689.0, 83785.0, 83856.0, 83847.0, 83771.0, 83821.0, 83512.0], [88130.0, 87921.0, 88277.0, 88034.0, 87997.0, 88301.0, 88348.0, 88301.0, 88185.0, 88244.0] ] # draw the graph styles = ['g-x', 'k-x', 'y-o', 'r-^', 'b-s'] #legend.get_frame().set_facecolor('#00FFCC') ylabel = r'f(S) - value of function' xlabel = r'k - cardinality constraint' draw.draw_errorbar(ks, values, labels, styles, xlabel, ylabel)
[1032, 1137, 1140, 1156, 1150], [1089, 1100, 1105, 1119, 1109], [1083, 1075, 1091, 1081, 1069], [1066, 1050, 1049, 1048, 1059], [1044, 1038, 1051, 1057, 1049], [1042, 1030, 1055, 1040, 1054], [1032, 1049, 1032, 1040, 1031]] values = {} values[labels[0]] = [256, 438, 602, 668, 756, 828, 848, 890, 925] values[labels[1]] = [305, 466, 648, 752, 828, 871, 900, 926, 946] values[labels[2]] = [[105, 149, 157, 110, 151], [171, 258, 246, 215, 275], [402, 368, 371, 384, 451], [604, 546, 542, 613, 623], [643, 637, 679, 707, 713], [806, 801, 783, 778, 749], [849, 864, 862, 817, 859], [858, 853, 871, 883, 886], [900, 917, 904, 885, 885]] # draw the graph styles = ['g-x', 'r-^', 'b-s'] #legend.get_frame().set_facecolor('#00FFCC') ylabel = r'number of value queries' xlabel = r'k - cardinality constraint' draw.draw_errorbar(ks, nQueries, labels, styles, xlabel, ylabel, (0, 20000)) ylabel = r'f(S) - value of function' xlabel = r'k - cardinality constraint' draw.draw_errorbar(ks, values, labels, styles, xlabel, ylabel)
[31722.0, 33294.0, 31759.0, 31679.0, 30102.0], [38573.0, 35615.0, 39457.0, 39573.0, 39981.0], [47617.0, 43657.0, 44409.0, 45985.0, 44799.0], [50555.0, 48164.0, 51234.0, 48179.0, 49227.0], [56211.0, 54317.0, 57817.0, 55371.0, 53776.0] ] values[labels[3]] = [ [12541.0, 12252.0, 12900.0, 12393.0, 12450.0], [23498.0, 23385.0, 21819.0, 23713.0, 22688.0], [31413.0, 32649.0, 31581.0, 32304.0, 30625.0], [35723.0, 36824.0, 36235.0, 38445.0, 36141.0], [43299.0, 44515.0, 46247.0, 43664.0, 43961.0], [51547.0, 46949.0, 48358.0, 49306.0, 50617.0], [53129.0, 52297.0, 54272.0, 53216.0, 53505.0] ] # draw the graph styles = ['g-x', 'r-^', 'b-s', 'y-x'] #legend.get_frame().set_facecolor('#00FFCC') ylabel = r'f(S) - value of function' xlabel = r'k - cardinality constraint' draw.draw_errorbar(ks, values, labels, styles, xlabel, ylabel)
labels = ['Greedy', 'GreedyLazy', 'StocGreedy'] nQueries = {} nQueries[labels[0]] = [nSets * a for a in ks] nQueries[labels[1]] = [2048, 2053, 2058, 2063, 2068, 2073, 2078, 2083, 2088] nQueries[labels[2]] = [[1464, 1462, 1457, 1441, 1450], [1214, 1222, 1221, 1222, 1217], [1032, 1137, 1140, 1156, 1150], [1089, 1100, 1105, 1119, 1109], [1083, 1075, 1091, 1081, 1069], [1066, 1050, 1049, 1048, 1059], [1044, 1038, 1051, 1057, 1049], [1042, 1030, 1055, 1040, 1054], [1032, 1049, 1032, 1040, 1031]] values = {} values[labels[0]] = [256, 438, 602, 668, 756, 828, 848, 890, 925] values[labels[1]] = [305, 466, 648, 752, 828, 871, 900, 926, 946] values[labels[2]] = [[105, 149, 157, 110, 151], [171, 258, 246, 215, 275], [402, 368, 371, 384, 451], [604, 546, 542, 613, 623], [643, 637, 679, 707, 713], [806, 801, 783, 778, 749], [849, 864, 862, 817, 859], [858, 853, 871, 883, 886], [900, 917, 904, 885, 885]] # draw the graph styles = ['g-x', 'r-^', 'b-s'] #legend.get_frame().set_facecolor('#00FFCC') ylabel = r'number of value queries' xlabel = r'k - cardinality constraint' draw.draw_errorbar(ks, nQueries, labels, styles, xlabel, ylabel, (0, 20000)) ylabel = r'f(S) - value of function' xlabel = r'k - cardinality constraint' draw.draw_errorbar(ks, values, labels, styles, xlabel, ylabel)