Estefani Gaytan Nunez

upload

......@@ -37,6 +37,10 @@ __author__ = 'egaytan'
def savescreen(output, dic, path):
if output:
DF.from_dict(dic).to_csv(path+'.csv', sep = "\t", index = True)
def plotMax(yvalues, size):
scorelist = list(yvalues)
maxscore = max(scorelist)
plt.plot(scorelist.index(maxscore), maxscore, markersize=size)
####################################################################################
# MAIN PROGRAM #
......@@ -89,13 +93,15 @@ if __name__ == '__main__':
plt.ylabel("score")
plt.rcParams.update()
plt.grid()
plt.plot(scoresTable['precision'],'co--', label='precision', linewidth=1, markersize=6)
plt.plot(scoresTable['f1-score'], 'bo--', label='F1', linewidth=1, markersize=6)
plt.plot(scoresTable['recall'], 'mo--', label='recall' , linewidth=1, markersize=6)
plt.plot(scoresTable['CV'], 'ro--', label='CV' , linewidth=1, markersize=6)
plt.plot(scoresTable['precision'],'co--', label='precision', linewidth=1, markersize=4)
plotMax(scoresTable['precision'], 8)
plt.plot(scoresTable['f1-score'], 'bo--', label='F1', linewidth=1, markersize=4)
plt.plot(scoresTable['recall'], 'mo--', label='recall' , linewidth=1, markersize=4)
plt.plot(scoresTable['CV'], 'ro--', label='CV' , linewidth=1, markersize=4)
for k,v in dict(scoresTable).items():
for a,b in zip(range(64), v):
plt.text(a-0.5, float(b)+0.0020, b[0:6], fontsize=5)
#plt.plot(max(scoresTable['precision']), scoresTable['precision'].index(max(scoresTable['precision'])), markersize=8)
plt.legend(loc='upper left')
plt.xticks(range(64), list(scoresTable.index)[0:65], rotation=90, fontsize=8)
plt.xticks(range(64), list(scoresTable.index)[0:65], rotation=270, fontsize=8)
fig.savefig(imageName, bbox_inches='tight', pad_inches = 0.3)
......

232 KB | W: | H:

228 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin