diff options
Diffstat (limited to 'train.cpp')
-rw-r--r-- | train.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -72,9 +72,19 @@ int predict(DataProvider &dp) { rank_CMC(D,L,cmc); } - if (vm.count("output") && vm.count("predict")) + if (vm.count("predict")) + { + if (vm.count("pair")) + { + vector<double> pair; + rank_pair(D,L,pair); + for (int i=0;i<pair.size();++i) + *ot<<pair[i]<<endl; + } + else for (int i=0; i<L.size();++i) *ot<<L[i]<<endl; + } LOG(INFO)<<"Finished"; if (vm.count("cmc")) @@ -110,6 +120,7 @@ int main(int argc, char **argv) { ("cmc,C", "enable cmc auditing") ("debug,d", "show debug messages") ("single,s", "one from a pair") + ("pair,p","get pair result") ("model,m", po::value<string>(), "set input model file") ("output,o", po::value<string>(), "set output model/prediction file") ("feature,i", po::value<string>(), "set input feature file") |