Estefani Gaytan Nunez

upload

...@@ -38,7 +38,7 @@ def savescreen(output, dic, path): ...@@ -38,7 +38,7 @@ def savescreen(output, dic, path):
38 if output: 38 if output:
39 DF.from_dict(dic).to_csv(path+'.csv', sep = "\t", index = True) 39 DF.from_dict(dic).to_csv(path+'.csv', sep = "\t", index = True)
40 def maxPoint(yvalues): 40 def maxPoint(yvalues):
41 - scorelist = list(yvalues) 41 + scorelist = [float(i) for i in yvalues]
42 y = max(scorelist) 42 y = max(scorelist)
43 x = scorelist.index(y) 43 x = scorelist.index(y)
44 return(x,y) 44 return(x,y)
...@@ -99,8 +99,14 @@ if __name__ == '__main__': ...@@ -99,8 +99,14 @@ if __name__ == '__main__':
99 x,y = maxPoint(scoresTable['precision']) 99 x,y = maxPoint(scoresTable['precision'])
100 plt.plot(x, y, markersize=10) 100 plt.plot(x, y, markersize=10)
101 plt.plot(scoresTable['f1-score'], 'bo--', label='F1', linewidth=1, markersize=4) 101 plt.plot(scoresTable['f1-score'], 'bo--', label='F1', linewidth=1, markersize=4)
102 + x,y = maxPoint(scoresTable['f1-score'])
103 + plt.plot(x, y, markersize=10)
102 plt.plot(scoresTable['recall'], 'mo--', label='recall' , linewidth=1, markersize=4) 104 plt.plot(scoresTable['recall'], 'mo--', label='recall' , linewidth=1, markersize=4)
105 + x,y = maxPoint(scoresTable['recall'])
106 + plt.plot(x, y, markersize=10)
103 plt.plot(scoresTable['CV'], 'ro--', label='CV' , linewidth=1, markersize=4) 107 plt.plot(scoresTable['CV'], 'ro--', label='CV' , linewidth=1, markersize=4)
108 + x,y = maxPoint(scoresTable['CV'])
109 + plt.plot(x, y, markersize=10)
104 for k,v in dict(scoresTable).items(): 110 for k,v in dict(scoresTable).items():
105 for a,b in zip(range(64), v): 111 for a,b in zip(range(64), v):
106 plt.text(a-0.5, float(b)+0.0020, b[0:6], fontsize=5) 112 plt.text(a-0.5, float(b)+0.0020, b[0:6], fontsize=5)
......