You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Manuel Blechschmidt <Ma...@gmx.de> on 2014/07/01 09:14:20 UTC

Re: recommendation based on user preference

Hi Edith,
try the following project:

https://github.com/ManuelB/facebook-recommender-demo

On 30.06.2014, at 21:48, Edith Au <ed...@gmail.com> wrote:

> Hi,
> 
> 
> I am a newbie and am looking for some guidance to implement my
> recommender.  Any help would be greatly appreciated.  I have a small
> data set of location information with the following fields:
> neighborhood, amenities, and counts.  For example:
> 
> Downtown          Gym 15
> Downtown          Cafe 50
> …
> Midtown             Gym 30
> Midtown             Cafe 100
> Midtown             Bookstore 10
> ...
> Financial Dist
> …
> 
> 
> so on and so forth.  I want to recommend a neighborhood for a user to
> reside base on the amenities (and some other metrics) in his/her
> current neighborhood.    My understanding is that model-based
> recommendation would be a good fit for the job.

I would recommend a normal memory based approach for collaborative filtering e.g. based on Cosine or Pearson Correlation.

> If I am on the right
> track,  is there a experimental/beta recommender I can try?

Most recommenders in Mahout are stable and have production quality.

> 
> 
> If there is no such recommender yet, can I still use Mahout for my
> project?  For example, can I implement my own Similarity which only
> computes the similarity between one user's preference to a set of
> neighborhood?

Yes this is possible you have to implement:
https://builds.apache.org/job/mahout-quality/javadoc/org/apache/mahout/cf/taste/similarity/ItemSimilarity.html
and/or
https://builds.apache.org/job/mahout-quality/javadoc/org/apache/mahout/cf/taste/similarity/UserSimilarity.html

> If I understand Mahout correctly, User/Item Similarity
> would do N x (N-1) pair of comparisons as oppose to 1 x N comparisons.

If you use the Hadoop Job (org.apache.mahout.cf.taste.hadoop.item.RecommenderJob) then Mahout will calculate recommendations for all your users. If you use the normal taste in memory recommenders then only for the current user recommendations are generated.

> In my example, User/Item Similarity would compare between Downtown,
> Midtown, Fin Dist -- which would be a waste in computation resources
> since the comparisons are not needed.

You can implement your own CandidateItemsStrategy:
http://archive.cloudera.com/cdh4/cdh/4/mahout-0.7-cdh4.3.2/mahout-core/org/apache/mahout/cf/taste/recommender/CandidateItemsStrategy.html

to filter the items considered.

> 
> 
> Thanks in advance for your help.
> 
> Edith

Hope that helps
    Manuel

-- 
Manuel Blechschmidt
M.Sc. IT Systems Engineering
Schenkendorfstr. 3
56068 Koblenz
Mobil: 0173/6322621
Twitter: http://twitter.com/Manuel_B