How to create user and item profile in an item to item collaborative filtering? (Non-rating case) I want to build a recommender system for a coupons website which should do the following: Given the past purchase behaviour of a user, recommend coupons which the user is likely to buy. The data does not have any ratings for coupons by the user. It tells if a user bought a certain coupon or not, which category did it belong to, what is the gender and location of the user who bought these coupons etc.? I am implementing an item to item collaborative filtering. Based on what I have learnt through videos available on this topic, the following is my approach:


Build an item profile of all the coupons with attributes such as category of the coupon, location the coupon is available in and the days on which the coupon can be redeemed.
Build a user profile of all the registered users with attributes such as age, gender, and location.


Now I am making an item and user matrix, where I will have Coupons on the rows and Users in the columns. I will fill 0 and 1 depending on if a coupon C1 was bought by a user U1 in the past or not. In the same dataset, for the coupons for which I want to predict, I will calculate a score based on cosine similarity between items. 

My question is if I am using just 0s and 1s (coupon bought or not) to recommend coupons, what is the use of the item and user profile? How I can incorporate the intelligence in the recommendation system that if a user has bought more coupons from X category in the past than recommend him new Y coupons from the same category?  I read online about using random forests etc. to calculate "weights" of the attributes in recommendation systems, where do they fit in this scenario? 

P.S. I am doing everything in R. 

Many thanks in advance for any advice/suggestions.
You can use your item and user profiles to generate a prediciton function (i.e. a function that will predict how relevant a coupon will be for a user, also known as a representation for your items and users). Typical functions used for this purpose are Dot Product and Cosine Similarity. This step ensures the intelligence in the recommendations will incorporate categories information. 

Once your scores are predicted, you must compare them to your historical interactions by using a loss function (some examples are Root-mean-square-error and Kullback-Leibler divergence). This step will produce an error that you can use to inform your algorithm for learning (e.g. adjust the weights in your representation functions for items and users). 

For more details I strongly suggest you to check out the great slides compiled by James Kirk, which provide a framework to unify the research that has been done on the topic.