0
votes

I was exploring about content based algorithm,so i learnt about that content based algorithms works on to calculate similarity between item and user like "pandora" is going on. So my requirement is that i have scale of hundred, for example user can like 40% veg and 60% non-veg,there is ratio of like/dislike.There item will have also attributes veg,non veg. Can i compute similarity of user's preference ratio and item or there is any algorithm matching to my requirement or helping doc for me?

Thanks in advance

1

1 Answers

0
votes

Many standard similarity algorithms, including cosine similarity (https://en.wikipedia.org/wiki/Cosine_similarity) are appropriate. If you have two vectors (that is, scores for all attributes for one user in some order, and then scores for all attributes for another user in the same order), you can use cosine similarity over those vectors. If you have users A and B and attributes "veg", "spicy", and "sweet", and you have scores for the users for each attribute, just plug them into the cosine similarity algorithm. Since veg and non-veg just add to 100%, there's no need to calculate over both since non-veg won't add any information compared to veg.