예제 #1
0
def mar(true, pred, k=10):
    return user_mean(_mar, true, pred, k)
예제 #2
0
def mrr(true, pred, k=10):
    """Shows inverted position of the first relevant item, on average."""
    return user_mean(_mrr, true, pred, k)
예제 #3
0
def recall(true, pred, k=10):
    """Shows what percentage of relevant items appeared in recommendations, on average."""
    return user_mean(_recall, true, pred, k)
예제 #4
0
def precision(true, pred, k=10):
    """Shows what percentage of items in recommendations are relevant, on average."""
    return user_mean(_precision, true, pred, k)
예제 #5
0
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)
예제 #6
0
def ndcg(true, pred, k=10):
    """Measures ranking quality"""
    return user_mean(_ndcg_score, true, pred, k)