# Recommendation algorithms based on a set of attributes

I'm building an application which should suggest products for the users. I want to base my recommendation on different attributes, like location, weather, date, etc. Each of these attributes can have multiple values so the feature space I need to consider is huge. I was thinking about two approaches to solve this problem. Firstly, using decision trees, so I create the tables with different decisions, e.g.

sunny; hot; France; summer; choose xyz
overcast, warm, Italy, spring, choose abc


Based on this data I could learn the decision tree and use it in my application.

Secondly, I could tag every recommendation item with the possible attributes to which it applies. For example:

xyz: {sunny} {hot} {France, Spain} {spring, summer}
abc: {overcast, raining} {cold, warm} {Italy} {spring, summer}


Then, based on the actual values of the attributes from the user I could infer an item to recommend.

The second option looks better for me as it requires from me only describing the recommendation items while the first approach requires describing a lot of situations which might happen so that the decision tree is of high quality. Unfortunately, I don't know any algorithm for the second solution.

Which approach would you use? If the second one, than what are the possible algorithms to have a look at?

## migrated from cstheory.stackexchange.comMay 10 '12 at 5:33

This question came from our site for theoretical computer scientists and researchers in related fields.

• For the 2nd option, are you suggesting aggregating all attributes associated with an item (across several instances)? I'm not sure how this helps, since in both cases you need to learn an association between items and attributes. – Nick May 11 '12 at 19:02
• I would probably go with the second option, and a random forest. – utdiscant May 11 '12 at 20:47
• @utdiscant, do you want to expand your comment into an answer? – Merbs Nov 29 '12 at 8:06