Update of /cvsroot/jboost/jboost/scripts
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31948/scripts
Modified Files:
surfing.py
Log Message:
bunch of misc changes
Index: surfing.py
===================================================================
RCS file: /cvsroot/jboost/jboost/scripts/surfing.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** surfing.py 23 Oct 2007 22:50:42 -0000 1.3
--- surfing.py 23 Oct 2007 23:52:26 -0000 1.4
***************
*** 13,17 ****
def usage():
print 'Usage: margin.py '
- print '\t--surfing=filename surfing file as output by jboost (-a -2 switch)'
print '\t--boost-info=filename file as output by jboost (-a -2 switch)'
print '\t--data=filename train/test filename'
--- 13,16 ----
***************
*** 128,131 ****
--- 127,131 ----
def write_gnuplot(lines, iter, datafile, params):
+ print 'Writing gnuplot file'
line_compare = lambda x,y : cmp(float(string.split(x,SEPARATOR)[1]), float(string.split(y,SEPARATOR)[1]))
lines.sort(line_compare);
***************
*** 138,142 ****
marg_max = max(margins);
marg_min = min(margins);
! lines = get_margin_hist(margins, 1);
max_bin = max([l[1] for l in lines])
lines = [str(l[0]) + ' ' + str(l[1]) + '\n' for l in lines]
--- 138,142 ----
marg_max = max(margins);
marg_min = min(margins);
! lines = get_margin_hist(margins, True);
max_bin = max([l[1] for l in lines])
lines = [str(l[0]) + ' ' + str(l[1]) + '\n' for l in lines]
***************
*** 216,220 ****
try:
! opts, args= getopt.getopt(sys.argv[1:], '', ['surfing=', 'boost-info=','data=','spec=','labels=', 'iteration=', 'framerate=', 'booster=', 'sample'])
except getopt.GetoptError, inst:
print 'Received an illegal argument:', inst
--- 216,220 ----
try:
! opts, args= getopt.getopt(sys.argv[1:], '', ['boost-info=','data=','spec=', 'framerate=', 'booster='])
except getopt.GetoptError, inst:
print 'Received an illegal argument:', inst
***************
*** 257,260 ****
--- 257,261 ----
num_elements= int((string.split(data[0],SEPARATOR)[1].split('=')[1]))
num_iterations = int(string.split(string.split(data[-num_elements-1], SEPARATOR)[0], '=')[1])
+ print 'Read ' + str(num_iterations) + ' iterations, each with ' + str(num_elements) + ' from ' + boostfile
#os.system('rm surfing*.eps surfing*.png')
|