Index: trunk/fundraiser-statistics/fundraiser-scripts/compute_confidence.py |
— | — | @@ -221,6 +221,7 @@ |
222 | 222 | means_2 = ret[1] |
223 | 223 | std_devs_1 = ret[2] |
224 | 224 | std_devs_2 = ret[3] |
| 225 | + confidence = ret[4] |
225 | 226 | |
226 | 227 | #print means_1 |
227 | 228 | #print means_2 |
— | — | @@ -233,8 +234,7 @@ |
234 | 235 | subplot_index = 111 |
235 | 236 | fname = test_name + '.png' |
236 | 237 | |
237 | | - title = query_obj.get_plot_title(test_name) |
238 | | - title = title + ' -- ' + start_time + ' - ' + end_time |
| 238 | + title = confidence + '\n\n' + test_name + ' -- ' + start_time + ' - ' + end_time |
239 | 239 | |
240 | 240 | max_mean = max(max(means_1),max(means_2)) |
241 | 241 | max_sd = max(max(std_devs_1),max(std_devs_2)) |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | max_x = float(math.ceil(max(times_indices))) + 1.0 |
245 | 245 | ranges = [-0.5, max_x, 0, max_y] |
246 | 246 | |
247 | | - ylabel = query_obj.get_plot_ylabel(metric_name) |
| 247 | + ylabel = metric_name |
248 | 248 | self.gen_plot(means_1, means_2, std_devs_1, std_devs_2, times_indices, title, xlabel, ylabel, ranges, subplot_index, fname) |
249 | 249 | |
250 | 250 | return |
— | — | @@ -321,50 +321,50 @@ |
322 | 322 | |
323 | 323 | # determine the probability that the |
324 | 324 | if (W >= 1.9): |
325 | | - print '95% confident about the winner.' |
| 325 | + conf_str = '95% confident about the winner.' |
326 | 326 | P = 0.95 |
327 | 327 | elif (W >= 1.6): |
328 | | - print '89% confident about the winner.' |
| 328 | + conf_str = '89% confident about the winner.' |
329 | 329 | P = 0.89 |
330 | 330 | elif (W >= 1.3): |
331 | | - print '81% confident about the winner.' |
| 331 | + conf_str = '81% confident about the winner.' |
332 | 332 | P = 0.81 |
333 | 333 | elif (W >= 1.0): |
334 | | - print '73% confident about the winner.' |
| 334 | + conf_str = '73% confident about the winner.' |
335 | 335 | P = 0.73 |
336 | 336 | elif (W >= 0.9): |
337 | | - print '68% confident about the winner.' |
| 337 | + conf_str = '68% confident about the winner.' |
338 | 338 | P = 0.68 |
339 | 339 | elif (W >= 0.8): |
340 | | - print '63% confident about the winner.' |
| 340 | + conf_str = '63% confident about the winner.' |
341 | 341 | P = 0.63 |
342 | 342 | elif (W >= 0.7): |
343 | | - print '52% confident about the winner.' |
| 343 | + conf_str = '52% confident about the winner.' |
344 | 344 | P = 0.52 |
345 | 345 | elif (W >= 0.6): |
346 | | - print '45% confident about the winner.' |
| 346 | + conf_str = '45% confident about the winner.' |
347 | 347 | P = 0.45 |
348 | 348 | elif (W >= 0.5): |
349 | | - print '38% confident about the winner.' |
| 349 | + conf_str = '38% confident about the winner.' |
350 | 350 | P = 0.38 |
351 | 351 | elif (W >= 0.4): |
352 | | - print '31% confident about the winner.' |
| 352 | + conf_str = '31% confident about the winner.' |
353 | 353 | P = 0.31 |
354 | 354 | elif (W >= 0.3): |
355 | | - print '24% confident about the winner.' |
| 355 | + conf_str = '24% confident about the winner.' |
356 | 356 | P = 0.24 |
357 | 357 | elif (W >= 0.2): |
358 | | - print '16% confident about the winner.' |
| 358 | + conf_str = '16% confident about the winner.' |
359 | 359 | P = 0.16 |
360 | 360 | elif (W >= 0.1): |
361 | | - print '8% confident about the winner.' |
| 361 | + conf_str = '8% confident about the winner.' |
362 | 362 | P = 0.08 |
363 | 363 | else: |
364 | | - print 'There is no clear winner.' |
| 364 | + conf_str = 'There is no clear winner.' |
365 | 365 | P = 0.08 |
366 | 366 | |
367 | 367 | |
368 | | - return [means_1, means_2, std_devs_1, std_devs_2] |
| 368 | + return [means_1, means_2, std_devs_1, std_devs_2, conf_str] |
369 | 369 | |
370 | 370 | |
371 | 371 | """ |