diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-06-04 00:46:43 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-06-04 00:46:43 +0800 |
commit | 748b85b06b600f6deeedb42d9c3fa983c4513ae3 (patch) | |
tree | 66d980522aa3f2bde862156227a19bb8b685b689 | |
parent | dae9241190d658f44af6e3f8d7de107f03771797 (diff) | |
download | cross-748b85b06b600f6deeedb42d9c3fa983c4513ae3.tar.gz cross-748b85b06b600f6deeedb42d9c3fa983c4513ae3.tar.bz2 cross-748b85b06b600f6deeedb42d9c3fa983c4513ae3.zip |
train tested
-rw-r--r-- | cross.py | 2 | ||||
-rw-r--r-- | ensemble.py | 6 | ||||
-rw-r--r-- | train.py | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -1,6 +1,6 @@ from misc import * -def onefold(inr,inm,tot,clist,folds,resm) +def onefold(inr,inm,tot,clist,folds,resm): #clist=[0.0001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 10, 100, 1000] diff --git a/ensemble.py b/ensemble.py index 34b4024..fea3d6a 100644 --- a/ensemble.py +++ b/ensemble.py @@ -1,7 +1,7 @@ from misc import * import math -def onefold(inr,inm,tot,clist,folds,resm) +def onefold(inr,inm,tot,clist,folds,resm): #inr="a.rid" #resm="res.m" @@ -63,10 +63,10 @@ def onefold(inr,inm,tot,clist,folds,resm) oum="%d-%g.m" % (i,c) rid = "a%d.rid"%i params = "-T -d -m %s -i %s -o %s -c %g" % (inm,rid,oum,c) - #train(params) + train(params) oup="%d-%g.p"%(i,c) params = "-P -p -m %s -i %s -o %s" %(oum,inr,oup) - #bare(params) + bare(params) for p in getpred(oup): mai=max(abs(p),mai); @@ -8,4 +8,4 @@ folds=4 for i in range(10): print("iter %d:" %i) - ensemble-train(inr,"%d.m"%i,316,clist,folds,"%d.m"%(i+1)) + ensemble.onefold(inr,"%d.m"%i,316,clist,folds,"%d.m"%(i+1)) |