开发者

Mahout -- Recommend for a type of people

I am a newbie learning mahout.

I learned that there are five recommenders in mahout. User-based, Item-based,...

The datasets I used is movielens 100K

I am thinking implement a little different movie recommender from user based one. i.e., instead of taking user id as an input to r开发者_StackOverflow中文版ecommend movies to only one user, I want to take user demographic information, e.g., age range, gender, occupation, and zip code.

But the problem is how do I create my own user similarity method (The original one is taking two long type user id as parameters) and how do I combine u.user file and u.data file together?


I understand your question now. I think the simplest thing is to temporary create a dummy user with the demographic properties you are querying for, and then recommend for that dummy user.

Yes, you would have to write a UserSimilarity that implements whatever similarity rule you want on top of the demographic data.


Maybe there is another solution.

I implement my own Rescorer to deal with u.user file and input (gender, age range, ...). If each piece of information is equal, then I put the according user id into a FastIDSet.

Then, in the rescore method, I will check if the current user id is in FastIDSet, if yes, the augment the score.

In my own Recommender, I will use PlusAnoymousUserDataModel to get a temp id, and call the method recommen(id, howMany, rescorer)

However, after I tried different dataset file, I get 0 recommended item.

I am thinking whether it is the right way to use PlusAnoymousUserDataModel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜