From 60881b380b02637c27497c4508faf2345a534679 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sat, 27 Jun 2015 20:42:23 +0800 Subject: comments & readme --- model/rankaccu.cpp | 3 +++ model/ranksvm.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'model') diff --git a/model/rankaccu.cpp b/model/rankaccu.cpp index 0f55e26..caa3c5a 100644 --- a/model/rankaccu.cpp +++ b/model/rankaccu.cpp @@ -102,6 +102,7 @@ void rank_accu(RidList &D,const vector pred) AP += ((double)C[k])/(k-j); AP=AP*2/(i-j)-1; accu_AP+=AP; + LOG(INFO)<<"qid:"< pred,CMC & cmc) { cmc.addEntry(k-j); break; // account only for the first match; } + LOG(INFO)<<"top: "<< D.getO(pred_rank[j]%D.getqSize())->qid <<" "<qid <<" "<qid <<" "<qid <<" "<qid + <<" "<< D.getO(pred_rank[j+5]%D.getqSize())->qid <<" "<qid <<" "<qid <<" "<qid <<" "<qid; } } diff --git a/model/ranksvm.h b/model/ranksvm.h index a17e3c9..a19ad63 100644 --- a/model/ranksvm.h +++ b/model/ranksvm.h @@ -27,8 +27,6 @@ protected: public: virtual int train(RidList &D)=0; virtual int predict(RidList &D,std::vector &res)=0; - // TODO Not sure how to construct this - // Possible solution: generate a nxn matrix each row contains the sorted list of ranker result. int saveModel(const std::string fname); static RSVM* loadModel(const std::string fname); virtual std::string getName()=0; -- cgit v1.2.3-70-g09d2