6
votes

I'm looking to write a basic recommender system in Objective-C and I'm looking for a basic algorithm for the job. Unfortunately off-the-shelf systems are off the table since none seem to be for Objective-C.

I'm going to have a database of items, each with tags (think movies with tags like "horror", "action", etc). Each item would have ~5 or so of these tags. When a user first uses the app their profile will be primed based on their input to a series of questions, associating some tags with their profile.

As the user continues to use the system and rate various items (on a hate/like/love basis) I'd like to adjust the weighting of the recommended tags based on that feedback. I'd also like to take in a few other properties of their ratings as their profile grows, like for example "the 80s" if this dealt with movies. Or maybe director, sticking with the movie theme.

I'm opting to avoid the normal (or at least popular) recommender systems where it looks for similar users to generate recommendations. This is going to have a large item database and minimal users to start.

Can anyone recommend a good starting point for an algorithm like this, I'd hate to reinvent the wheel, and there's a lot out there?

2
I have no experience with this, but I would think this could be made without any engines or frameworks, probably giving you much better flexibility and control. For basics I dont suppose it has to be much more than counting tags and maybe ranging years and stuff like that (the 80s for instance), and then either calculate what the users likes and find matches on that, or calculate each movies match-score with the user and pick the top-something. - altschuler
How about creating a knowledge base and use backward chaining algorithm? it's bit overkill butI guess that will work. - TeaCupApp
Is there a reason why you stick to objective-c, if you have off the shelf product in a different language - I'd use it, either by writing this language as the code, or to use it as an existing implementation and just build interface to communicate between the two modules. - amit
@amit it needs to be in objective-c because the recommendation needs to occur in app (client-side). - Parrots
@Parrots: If you find a recommendation engine in C or C++, you can link that into your Objective C client directly, just as easily as you could with Objective C. If it's in Python or Ruby or something, you can either embed an interpreter in your Objective C client, or just wrap a call to the standard interpreter process (or even use PyPy or equivalent to create a semi-compiled native binary out of it) There's no reason all client-side code has to be in Objective C. - abarnert

2 Answers

1
votes

could you please refer the python-recsys: https://github.com/ocelma/python-recsys, this software use SVD algorithm, I think it is a base algorithm but effective enough. The required library is numpy and scipy, which are written in C, and wrapped by Python. I think it is easy to compile and port to objective-c

0
votes

You can use item based recommendation which sounds perfect for your needs. You can later start to incorporate tags into the weighting but for now I'd suggest considering only the items.

You can learn a little more at http://www.cs.carleton.edu/cs_comps/0607/recommend/recommender/itembased.html There are a good few implementations of it on the net.

What you mentioned in your post would be called user based collaborative filtering.