From: Sunsern C. <sch...@us...> - 2009-06-08 23:41:17
|
Update of /cvsroot/jboost/jboost/scripts In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11232/scripts Modified Files: Tag: jboost-2_0 AddRandomIndex.py VisualizeScores.py Log Message: jboost 2.0 Index: VisualizeScores.py =================================================================== RCS file: /cvsroot/jboost/jboost/scripts/VisualizeScores.py,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** VisualizeScores.py 12 Mar 2009 23:42:40 -0000 1.9 --- VisualizeScores.py 8 Jun 2009 23:40:49 -0000 1.9.2.1 *************** *** 1,5 **** #!/usr/bin/python ! import sys, os, os.path, re, math, glob def usage(): --- 1,5 ---- #!/usr/bin/python ! import getopt, sys, os, os.path, re, math, glob def usage(): *************** *** 11,30 **** def main(): ! args = sys.argv[1:] ! ! globpath = None ! if len(args) == 1: ! globpath = args[0] ! else: usage() sys.exit(2) ! testfiles = glob.glob(globpath + "*.test.boosting.info") ! trainfiles = glob.glob(globpath + "*.train.boosting.info") ! #print testfiles ! #print trainfiles ! cmd = "java jboost.visualization.HistogramFrame " + str(len(testfiles)) + " " for f in testfiles: cmd = cmd + f + " " --- 11,49 ---- def main(): ! ! carry = 0 ! ! try: ! opts, args = getopt.getopt(sys.argv[1:],'hc',[]) ! except getopt.GetoptError: ! print 'Error: Illegal arguments' usage() sys.exit(2) ! for o, a in opts: ! if o in ('-h'): ! usage() ! sys.exit() ! elif o in ('-c'): ! carry = 1 ! else: ! assert False, "unhandled option" ! if len(args) < 1: ! usage() ! sys.exit(1) ! globpath = args[0] ! ! testfiles = glob.glob(globpath + "*.test.boosting.info") ! trainfiles = glob.glob(globpath + "*.train.boosting.info") ! infofiles = glob.glob(globpath + "*.info") ! ! for f in testfiles: ! infofiles.remove(f) ! for f in trainfiles: ! infofiles.remove(f) ! ! cmd = "java jboost.visualization.HistogramFrame " + str(carry) + " " + str(len(testfiles)) + " " for f in testfiles: cmd = cmd + f + " " *************** *** 32,36 **** for f in trainfiles: cmd = cmd + f + " " ! os.system(cmd) --- 51,57 ---- for f in trainfiles: cmd = cmd + f + " " ! cmd = cmd + str(len(infofiles)) + " " ! for f in infofiles: ! cmd = cmd + f + " " os.system(cmd) Index: AddRandomIndex.py =================================================================== RCS file: /cvsroot/jboost/jboost/scripts/AddRandomIndex.py,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** AddRandomIndex.py 17 Jan 2009 02:00:31 -0000 1.2 --- AddRandomIndex.py 8 Jun 2009 23:40:49 -0000 1.2.2.1 *************** *** 74,78 **** i=0 for idx,line in enumerate(features): ! if line.startswith(('\n','exampleTerminator','attributeTerminator','maxBadExa','maxBadAtt')): i=i+1 else: --- 74,78 ---- i=0 for idx,line in enumerate(features): ! if line.startswith(('\n','\r\n','exampleTerminator','attributeTerminator','maxBadExa','maxBadAtt')): i=i+1 else: |