concept list in category recommender system

appears as: list, The list, lists, list
Practical Recommender Systems

This is an excerpt from Manning's book Practical Recommender Systems.

4.  Prediction is calculated using the user preferences retrieved from the user database. It’s likely that the calculation will remove one or more items from the list due to a small predicted rating. In figure 1.9, items C and E are removed.

Figure 5.11. What my wife bought (the list contains plastic bag, yogurt, milk, and olives).
Listing 5.7. Creating a list and adding it to a dictionary
def generate_transactions(data):
    transactions = dict()

    for trans_item in data:                                  #1
        id = trans_item["session_id"]                        #2
        if id not in transactions:                           #3
            transactions[id] = []
        transactions[id].append(trans_item["content_id"])    #4

    return transactions

The discounted cumulative gain (DCG) is hard to define but easy enough to understand. It’s about finding each relevant item and then penalizing the items the farther down it is in the list. It’s much like the MAP that you looked at earlier. But where the MAP only works with relevance, the DCG looks at levels of relevancy.

To determine DCG, you give each item a relevancy score. In the case of a recommender system, it can be the predicted rating or profit on the item. Here, relevance is also denoted as gain. You could have also called it the discounted cumulative relevance. The relevance is discounted by the position in the list: these relevance scores are added up to get the discounted cumulative gain.