def mar(true, pred, k=10): return user_mean(_mar, true, pred, k)
def mrr(true, pred, k=10): """Shows inverted position of the first relevant item, on average.""" return user_mean(_mrr, true, pred, k)
def recall(true, pred, k=10): """Shows what percentage of relevant items appeared in recommendations, on average.""" return user_mean(_recall, true, pred, k)
def precision(true, pred, k=10): """Shows what percentage of items in recommendations are relevant, on average.""" return user_mean(_precision, true, pred, k)
def hitrate(true, pred, k=10): """Shows what percentage of users has at least one relevant recommendation in their list.""" return user_mean(_hitrate, true, pred, k)
def ndcg(true, pred, k=10): """Measures ranking quality""" return user_mean(_ndcg_score, true, pred, k)