I am building a recommender system, in which for one system there will be only one user. So we cannot use something like user-user data. Recommendation is an item which contains 10-15 attributes ie categorical values. And user can like/dislike the item. Dataset looks like below table, only it has 10-15 attributes. enter image description here

Someone please suggest me how to implement this or share your ideas. Recommender system should be like if user likes an item, it should recommend similar item and also building his/her user profile at the same time based on like/dislike. So eventually it will build a user profile and the items recommended by the system should be closer to past liked one and at the same time distant from disliked one. Also is there any way i can get due to which attributes user has liked/disliked that item among 10-15 attributes.

Currently I am doing :

  1. Recommending a random items
  2. Get user feedback like/dislike
  3. If user liked- calculating Jaccard's similarity and recommending the next most similar item to the user.
  4. If user disliked- I don't want to recommend completely different item, so recommending item which has 2nd most Jaccard's similarity.
  5. Finally I have the data of user like and dislike. Now I need to personalized the recommendation, where I stuck.

Can I use Association rule mining, or only content based algo is enough, or how to use collaborative filtering? Please share your views.


1 Answer 1


You are on a good track. Content-based filtering (recommending items similar to other items the user liked) is a valid and common way of doing recommendations.

Collaborative filtering won't work for one user, because it needs data from multiple users (hence “collaborative” in the name). It produces the “other people who liked X also liked Y” recommendations.

Association rules could be one of the next steps to improve the recommendations. However, unless you want to recommend the same items multiple times, you would need to have data from other users to make it work.

For a single user, content-based filtering is the only algorithm that would work out of the box. It can be improved by finding better ways to find “similar” items (e.g. use a language model to create embeddings from the names of the products as additional features). You could also use external data, for example, if you recommended movies, you could use an algorithm trained on the public IMDB data.

  • $\begingroup$ Thank you for your response. Any suggestion how to use the pattern mined for ARM? Say based on liked/disliked data, I get a pattern (a,b,like) => (c,d) with 70% confidence ie 70% time if (a,b,c,d) are there user liked that item. How we can use this data for our next recommendation (assuming every recommended item is removed from the dataset, so no chance of recommending same item again). $\endgroup$
    – Raj
    Commented Jun 27, 2023 at 6:55
  • $\begingroup$ For every item - attribute has categorical values eg: (low,high, 0,1 ). Is there any way based on like/dislike data, I can get the attribute which is more important to user) eg: user is liking attribute-1 and attribute-3 more and disliking attribute-4. And name of item doesn't matter. $\endgroup$
    – Raj
    Commented Jun 27, 2023 at 6:59
  • $\begingroup$ @Raj if you did something like a market basket analysis you would knew things like "users who bought X also bought Y", then if your collaborative filtering algorithm recommended X, you could enrich the recommendations by also adding Y as additional recommendation. $\endgroup$
    – Tim
    Commented Jun 27, 2023 at 8:20
  • $\begingroup$ As for the most important attributes, this is just a feature selection problem. If you were predicting likes (e.g. using logistic regression) then you could use some feature importance scores used commonly for feature selection to pick the features that work the best for making the predictions. The "how" depends on many details. $\endgroup$
    – Tim
    Commented Jun 27, 2023 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.