concept item in category recommender system

appears as: items, n item, item, items, An item, item, The item
Practical Recommender Systems

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

  • A prediction is different than a recommendation. A prediction is about projecting what rating a user would give content, while a recommendation is a list of items that’s relevant to the user.
  • Figure 4.12. A snippet of the auto-generated data. This is the data related to user 400005 (Pietro) and item 1355644.

    Before ordering data by price, consider what that means. For cupon.com, that could mean the items with the smallest savings would always be on top, or vice versa. The next option could be to order by the percentage of the savings. For example, if you save $1 on something that costs $10, the item would be shown before something that you save $2 on but costs $100. That’s because one discount is 10% while the other is 2%.

    Listing 5.9. Creating a list of itemsets with only one element
    def calculate_itemsets_one(transactions, min_sup=0.01):
    
        N = len(transactions)                               #1
    
        temp = defaultdict(int)                             #2
        one_itemsets = dict()
    
        for key, items in transactions.items():             #3
            for item in items:                              #4
                inx = frozenset({item})                     #5
                temp[inx] += 1                              #6
    
        # remove all items that is not supported.
        for key, itemset in temp.items():                   #7
            if itemset > min_sup * N:                       #8
                one_itemsets[key] = itemset
    
        return one_itemsets