use of Ranker.evaluator.MAP_Evaluator in project IR_Base by Linda-sunshine.
the class L2RMetricLearning method evaluate.
double evaluate(OptimizationType otype) {
Evaluator eval;
if (otype.equals(OptimizationType.OT_MAP))
eval = new MAP_Evaluator();
else if (otype.equals(OptimizationType.OT_NDCG))
eval = new NDCG_Evaluator(LambdaRank.NDCG_K);
else
eval = new Evaluator();
double perf = 0;
for (_Query q : m_queries) {
for (_QUPair qu : q.m_docList) qu.score(m_weights);
perf += eval.eval(q);
}
return perf / m_queries.size();
}
Aggregations