If the company (usr) has ever viewed or bought items in the product category (item), then the recommendation column contains the value in the prod_preference column of the user table; otherwise, the column contains the recommendation score calculated by the function.
If the recommendation value is greater than 0 and the company has never viewed or bought items in the product category (that is, the value in the prod_preference column of the user table is 0), then the new_reco_flag is 1, meaning that the product category is to be recommended to the company.
item | usr | recommendation | new_reco_flag |
---|---|---|---|
Consumer | Costco | 8.5 | 0 |
Corporate | Staples | 7.51515 | 0 |
Home Office | Costco | 7.48889 | 1 |
Corporate | Costco | 7.26667 | 0 |
Consumer | Ikea | 7 | 0 |
Small Business | Costco | 6.7 | 0 |
Corporate | Ikea | 6.31034 | 0 |
Small Business | Ikea | 5.82609 | 1 |
Consumer | Staples | 5.33333 | 1 |
Home Office | Walmart | 5.13793 | 0 |
Small Business | Walmart | 5.13793 | 0 |
Home Office | Staples | 4.5 | 0 |
Home Office | Ikea | 4.10345 | 0 |
Corporate | Walmart | 3.97826 | 1 |
Small Business | Staples | 3.90909 | 0 |
Consumer | Walmart | 2 | 0 |