summaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2015-05-20 10:55:42 +0800
committerJoe Zhao <ztuowen@gmail.com>2015-05-20 10:55:42 +0800
commit18ed589675b7887b1b49a47009784d1efe1057eb (patch)
tree46d89483dc85d59a28a60c742976c74f24afe1a0 /model
parentd5ab835ea462b4e75298b34fb8f61dbf14793aa8 (diff)
downloadranksvm-18ed589675b7887b1b49a47009784d1efe1057eb.tar.gz
ranksvm-18ed589675b7887b1b49a47009784d1efe1057eb.tar.bz2
ranksvm-18ed589675b7887b1b49a47009784d1efe1057eb.zip
openmp cont
Diffstat (limited to 'model')
-rw-r--r--model/rankaccu.cpp1
-rw-r--r--model/ranksvm.cpp8
2 files changed, 4 insertions, 5 deletions
diff --git a/model/rankaccu.cpp b/model/rankaccu.cpp
index f998e93..fc5b7b7 100644
--- a/model/rankaccu.cpp
+++ b/model/rankaccu.cpp
@@ -128,6 +128,5 @@ void rank_CMC(RidList &D,const std::vector<double> pred,CMC & cmc) {
cmc.addEntry(k-j);
break; // account only for the first match;
}
- j = i+1;
}
} \ No newline at end of file
diff --git a/model/ranksvm.cpp b/model/ranksvm.cpp
index 068bf47..a468729 100644
--- a/model/ranksvm.cpp
+++ b/model/ranksvm.cpp
@@ -11,12 +11,12 @@ using namespace std;
double C=1e-4;// Compensating & scaling
// Main terminating criteria
-int maxiter = 50; // max iteration count
+int maxiter = 1; // max iteration count
double prec=1e-10; // precision
// conjugate gradient
-double cg_prec=1e-10; // precision
-int cg_maxiter = 5; // not worth having a large number
-int ls_maxiter = 10;
+double cg_prec=1e-3; // precision
+int cg_maxiter = 500;
+int ls_maxiter = 20;
// line search
double line_prec=1e-10; // precision
double line_turb=1e-15; // purturbation