Lines 106-117
class benchonset(bench):
Link Here
|
106 |
|
106 |
|
107 |
def plotroc(self,d,plottitle=""): |
107 |
def plotroc(self,d,plottitle=""): |
108 |
import Gnuplot, Gnuplot.funcutils |
108 |
import Gnuplot, Gnuplot.funcutils |
|
|
109 |
from aubio.compat import GnuplotData |
109 |
gd = [] |
110 |
gd = [] |
110 |
fp = [] |
111 |
fp = [] |
111 |
for i in self.vlist: |
112 |
for i in self.vlist: |
112 |
gd.append(i['GD']) |
113 |
gd.append(i['GD']) |
113 |
fp.append(i['FP']) |
114 |
fp.append(i['FP']) |
114 |
d.append(Gnuplot.Data(fp, gd, with='linespoints', |
115 |
d.append(GnuplotData(fp, gd, with_='linespoints', |
115 |
title="%s %s" % (plottitle,i['mode']) )) |
116 |
title="%s %s" % (plottitle,i['mode']) )) |
116 |
|
117 |
|
117 |
def plotplotroc(self,d,outplot=0,extension='ps'): |
118 |
def plotplotroc(self,d,outplot=0,extension='ps'): |
Lines 142-153
class benchonset(bench):
Link Here
|
142 |
|
143 |
|
143 |
def plotpr(self,d,plottitle=""): |
144 |
def plotpr(self,d,plottitle=""): |
144 |
import Gnuplot, Gnuplot.funcutils |
145 |
import Gnuplot, Gnuplot.funcutils |
|
|
146 |
from aubio.compat import GnuplotData |
145 |
x = [] |
147 |
x = [] |
146 |
y = [] |
148 |
y = [] |
147 |
for i in self.vlist: |
149 |
for i in self.vlist: |
148 |
x.append(i['prec']) |
150 |
x.append(i['prec']) |
149 |
y.append(i['recl']) |
151 |
y.append(i['recl']) |
150 |
d.append(Gnuplot.Data(x, y, with='linespoints', |
152 |
d.append(GnuplotData(x, y, with_='linespoints', |
151 |
title="%s %s" % (plottitle,i['mode']) )) |
153 |
title="%s %s" % (plottitle,i['mode']) )) |
152 |
|
154 |
|
153 |
def plotplotpr(self,d,outplot=0,extension='ps'): |
155 |
def plotplotpr(self,d,outplot=0,extension='ps'): |
Lines 168-178
class benchonset(bench):
Link Here
|
168 |
|
170 |
|
169 |
def plotfmeas(self,d,plottitle=""): |
171 |
def plotfmeas(self,d,plottitle=""): |
170 |
import Gnuplot, Gnuplot.funcutils |
172 |
import Gnuplot, Gnuplot.funcutils |
|
|
173 |
from aubio.compat import GnuplotData |
171 |
x,y = [],[] |
174 |
x,y = [],[] |
172 |
for i in self.vlist: |
175 |
for i in self.vlist: |
173 |
x.append(i['thres']) |
176 |
x.append(i['thres']) |
174 |
y.append(i['dist']) |
177 |
y.append(i['dist']) |
175 |
d.append(Gnuplot.Data(x, y, with='linespoints', |
178 |
d.append(GnuplotData(x, y, with_='linespoints', |
176 |
title="%s %s" % (plottitle,i['mode']) )) |
179 |
title="%s %s" % (plottitle,i['mode']) )) |
177 |
|
180 |
|
178 |
def plotplotfmeas(self,d,outplot="",extension='ps', title="F-measure"): |
181 |
def plotplotfmeas(self,d,outplot="",extension='ps', title="F-measure"): |
Lines 201-211
class benchonset(bench):
Link Here
|
201 |
|
204 |
|
202 |
def plotfmeasvar(self,d,var,plottitle=""): |
205 |
def plotfmeasvar(self,d,var,plottitle=""): |
203 |
import Gnuplot, Gnuplot.funcutils |
206 |
import Gnuplot, Gnuplot.funcutils |
|
|
207 |
from aubio.compat import GnuplotData |
204 |
x,y = [],[] |
208 |
x,y = [],[] |
205 |
for i in self.vlist: |
209 |
for i in self.vlist: |
206 |
x.append(i[var]) |
210 |
x.append(i[var]) |
207 |
y.append(i['dist']) |
211 |
y.append(i['dist']) |
208 |
d.append(Gnuplot.Data(x, y, with='linespoints', |
212 |
d.append(GnuplotData(x, y, with_='linespoints', |
209 |
title="%s %s" % (plottitle,i['mode']) )) |
213 |
title="%s %s" % (plottitle,i['mode']) )) |
210 |
|
214 |
|
211 |
def plotplotfmeasvar(self,d,var,outplot="",extension='ps', title="F-measure"): |
215 |
def plotplotfmeasvar(self,d,var,outplot="",extension='ps', title="F-measure"): |
Lines 228-233
class benchonset(bench):
Link Here
|
228 |
|
232 |
|
229 |
def plotdiffs(self,d,plottitle=""): |
233 |
def plotdiffs(self,d,plottitle=""): |
230 |
import Gnuplot, Gnuplot.funcutils |
234 |
import Gnuplot, Gnuplot.funcutils |
|
|
235 |
from aubio.compat import GnuplotData |
231 |
v = self.v |
236 |
v = self.v |
232 |
l = v['l'] |
237 |
l = v['l'] |
233 |
mean = v['mean'] |
238 |
mean = v['mean'] |
Lines 244-250
class benchonset(bench):
Link Here
|
244 |
total = v['Torig'] |
249 |
total = v['Torig'] |
245 |
for i in range(len(per)): per[i] /= total/100. |
250 |
for i in range(len(per)): per[i] /= total/100. |
246 |
|
251 |
|
247 |
d.append(Gnuplot.Data(val, per, with='fsteps', |
252 |
d.append(GnuplotData(val, per, with_='fsteps', |
248 |
title="%s %s" % (plottitle,v['mode']) )) |
253 |
title="%s %s" % (plottitle,v['mode']) )) |
249 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
254 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
250 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
255 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
Lines 272-281
class benchonset(bench):
Link Here
|
272 |
|
277 |
|
273 |
def plothistcat(self,d,plottitle=""): |
278 |
def plothistcat(self,d,plottitle=""): |
274 |
import Gnuplot, Gnuplot.funcutils |
279 |
import Gnuplot, Gnuplot.funcutils |
|
|
280 |
from aubio.compat import GnuplotData |
275 |
total = v['Torig'] |
281 |
total = v['Torig'] |
276 |
for i in range(len(per)): per[i] /= total/100. |
282 |
for i in range(len(per)): per[i] /= total/100. |
277 |
|
283 |
|
278 |
d.append(Gnuplot.Data(val, per, with='fsteps', |
284 |
d.append(GnuplotData(val, per, with_='fsteps', |
279 |
title="%s %s" % (plottitle,v['mode']) )) |
285 |
title="%s %s" % (plottitle,v['mode']) )) |
280 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
286 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
281 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
287 |
#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |