Skip to content
Snippets Groups Projects
Commit 6ec70a8b authored by bbauvin's avatar bbauvin
Browse files

Added score over bars for global results

parent 7acce0c9
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,14 @@ import Metrics
__author__ = "Baptiste Bauvin"
__status__ = "Prototype" # Production, Development, Prototype
def autolabel(rects, ax):
# attach some text labels
for rect in rects:
height = rect.get_height()
ax.text(rect.get_x() + rect.get_width()/2., 1.01*height,
"%.2f" % round(height, 4),
ha='center', va='bottom')
def resultAnalysis(benchmark, results, name, times, metrics):
for metric in metrics:
......@@ -35,7 +43,8 @@ def resultAnalysis(benchmark, results, name, times, metrics):
else:
metricKWARGS = {}
ax.set_title(getattr(Metrics, metric[0]).getConfig(**metricKWARGS)+" on validation set for each classifier")
ax.bar(range(nbResults), validationScores, align='center')
rects = ax.bar(range(nbResults), validationScores, align='center')
autolabel(rects, ax)
ax.set_xticks(range(nbResults))
ax.set_xticklabels(names, rotation="vertical")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment