diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-05-20 19:04:03 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-05-20 19:04:03 +0800 |
commit | 482be9136a726923eb24c9f5c0244e94c0fc91bc (patch) | |
tree | 1575cf3a1fbde6e7bfa47d6471801542a0e1a8b8 /model | |
parent | b15766bef024f086c51e56aa9af17783d3c1ff68 (diff) | |
download | ranksvm-482be9136a726923eb24c9f5c0244e94c0fc91bc.tar.gz ranksvm-482be9136a726923eb24c9f5c0244e94c0fc91bc.tar.bz2 ranksvm-482be9136a726923eb24c9f5c0244e94c0fc91bc.zip |
term condition
Diffstat (limited to 'model')
-rw-r--r-- | model/ranksvm.cpp | 2 | ||||
-rw-r--r-- | model/ranksvmtn.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/model/ranksvm.cpp b/model/ranksvm.cpp index acc2f4e..3c31da7 100644 --- a/model/ranksvm.cpp +++ b/model/ranksvm.cpp @@ -14,7 +14,7 @@ double C=1e-4;// Compensating & scaling int maxiter = 1; // max iteration count double prec=1e-10; // precision // conjugate gradient -double cg_prec=1e-3; // precision +double cg_prec=1e-10; // precision int cg_maxiter = 1000; int ls_maxiter = 20; // line search diff --git a/model/ranksvmtn.cpp b/model/ranksvmtn.cpp index ba2d5a3..5916170 100644 --- a/model/ranksvmtn.cpp +++ b/model/ranksvmtn.cpp @@ -241,7 +241,7 @@ int train_orig(int fsize, RidList &Data,const VectorXd &corr,VectorXd &weight){ double nprec = step.dot(grad)/obj; ++iter; LOG(INFO)<<"Iter: "<<iter<<" Obj: " <<obj << " Ndec/Obj:"<<nprec << " linesearch: "<< -t ; - if (iter> maxiter) + if (iter>= maxiter) { LOG(INFO)<< "Maxiter reached"; break; |