diff options
Diffstat (limited to 'train.cpp')
-rw-r--r-- | train.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -48,6 +48,8 @@ int predict(DataProvider &dp) { RidList D; vector<double> L; CMC cmc; + Fscore f; + LOG(INFO)<<"Prediction started"; ofstream fout; @@ -82,6 +84,15 @@ int predict(DataProvider &dp) { *ot<<pair[i]<<endl; } else + if (vm.count("fscore")) + { + vector<double> pair; + f.audit(D); + pair=f.getFscore(); + for (int i=0;i<D.getfSize();++i) + *ot<<pair[i]<<endl; + } + else for (int i=0; i<L.size();++i) *ot<<L[i]<<endl; } @@ -121,6 +132,7 @@ int main(int argc, char **argv) { ("debug,d", "show debug messages") ("single,s", "one from a pair") ("pair,p","get pair result") + ("fscore,f","get F-score") ("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") |