Estefani Gaytan Nunez

upload

...@@ -37,10 +37,12 @@ __author__ = 'egaytan' ...@@ -37,10 +37,12 @@ __author__ = 'egaytan'
37 def savescreen(output, dic, path): 37 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 plotMax(yvalues, size): 40 +def maxPoint(yvalues):
41 scorelist = list(yvalues) 41 scorelist = list(yvalues)
42 - maxscore = max(scorelist) 42 + y = max(scorelist)
43 - plt.plot(scorelist.index(maxscore), maxscore, markersize=size) 43 + x = scorelist.index(y)
44 + return(x,y)
45 + #plt.plot(scorelist.index(maxscore), maxscore, markersize=size)
44 46
45 #################################################################################### 47 ####################################################################################
46 # MAIN PROGRAM # 48 # MAIN PROGRAM #
...@@ -94,7 +96,8 @@ if __name__ == '__main__': ...@@ -94,7 +96,8 @@ if __name__ == '__main__':
94 plt.rcParams.update() 96 plt.rcParams.update()
95 plt.grid() 97 plt.grid()
96 plt.plot(scoresTable['precision'],'co--', label='precision', linewidth=1, markersize=4) 98 plt.plot(scoresTable['precision'],'co--', label='precision', linewidth=1, markersize=4)
97 - plotMax(scoresTable['precision'], 8) 99 + x,y = maxPoint(scoresTable['precision'])
100 + plt.plot(x, y, markersize=10)
98 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)
99 plt.plot(scoresTable['recall'], 'mo--', label='recall' , linewidth=1, markersize=4) 102 plt.plot(scoresTable['recall'], 'mo--', label='recall' , linewidth=1, markersize=4)
100 plt.plot(scoresTable['CV'], 'ro--', label='CV' , linewidth=1, markersize=4) 103 plt.plot(scoresTable['CV'], 'ro--', label='CV' , linewidth=1, markersize=4)
......