Evaluators package

Evaluator

class openrec.utils.evaluators.Evaluator(etype, name)[source]
compute()[source]

Implicit Eval Manager

class openrec.utils.evaluators.ImplicitEvalManager(evaluators=[])[source]
_full_rank(pos_samples, excl_pos_samples, predictions)[source]
_partial_rank(pos_scores, neg_scores)[source]
full_eval(pos_samples, excl_pos_samples, predictions)[source]
partial_eval(pos_scores, neg_scores)[source]

AUC

class openrec.utils.evaluators.AUC(name='AUC')[source]
compute(rank_above, negative_num)[source]

Recall

class openrec.utils.evaluators.Recall(recall_at, name='Recall')[source]
compute(rank_above, negative_num)[source]

MSE

class openrec.utils.evaluators.MSE(name='MSE')[source]
compute(predictions, labels)[source]

NDCG

class openrec.utils.evaluators.NDCG(ndcg_at, name='NDCG')[source]
compute(rank_above, negative_num)[source]

Precision

class openrec.utils.evaluators.Precision(precision_at, name='Precision')[source]
compute(rank_above, negative_num)[source]