That's a bit of example code for the book. It is in the source code made available with the MEAP book. It should be downloadable -- if it's not apparent where it's available I'll ask Manning where it is.
I can send it to you -- see attached. You should get it though the mailing list won't I believe. But you should find all the source since there are more classes than just this. Sean On Wed, Jul 7, 2010 at 5:42 PM, samsam <[email protected]> wrote: > I seen LibimsetiRecomender in book <mahout in action>,but i can't find it in > mahout docs.What is it? > > On Tue, Jul 6, 2010 at 12:07 AM, samsam <[email protected]> wrote: > >> I become more clear about that,thanks for your help very much. >> >> >> On Mon, Jul 5, 2010 at 11:52 PM, Sean Owen <[email protected]> wrote: >> >>> Pre-compute the similarity based on what information? You mention that >>> you don't want to use Pearson and mention item attributes. >>> >>> If you are trying to use domain-specific attributes of items, then >>> it's up to you to write that logic. If you want to say books have a >>> "0.5" similarity when they are within the same genre, and "0.9" when >>> by the same author, you can just write that logic. That's not part of >>> the framework. >>> >>> The hook into the framework comes when you implement ItemSimilarity >>> with logic like that. Then just use that ItemSimilarity instead of one >>> of the given implementations. That's all. >>> >>> On Mon, Jul 5, 2010 at 4:32 PM, samsam <[email protected]> wrote: >>> > About the second question,I have not the similarity,I want to know is >>> how to >>> > pre-compute the item similarity. >>> > >>> > On Mon, Jul 5, 2010 at 11:20 PM, Sean Owen <[email protected]> wrote: >>> > >>> >> 1) Good question. One answer is to make these "anonymous" users real >>> >> users in your data model, at least temporarily. That is, they need not >>> >> be anonymous to the recommender, even if they're not yet a registered >>> >> user as far as your site is concerned. >>> >> >>> >> There's a class called PlusAnonymousUserDataModel that helps you do >>> >> this. It wraps a DataModel and lets you quickly add a temporary user, >>> >> recommend, then un-add that user. It may be the easiest thing to try. >>> >> >>> >> (BTW the book Mahout in Action covers this in section 5.4, in the >>> >> current MEAP draft.) >>> >> >>> >> 2) Not sure I fully understand. You already have some external, >>> >> pre-computed notion of item similarity? then just feed that in to >>> >> GenericItemSimilarity and use it from there. >>> >> >>> >> Sean >>> >> >>> >> On Mon, Jul 5, 2010 at 1:52 PM, samsam <[email protected]> wrote: >>> >> > Hello,all >>> >> > I want to build recommendation engine with apache mahout,I have read >>> some >>> >> > reading material,and I still have some questions. >>> >> > >>> >> > 1)How to recommend for anonymous users >>> >> > I think recommendation engine should return recommendations given a >>> item >>> >> > id.For example,a anonymous user reviews some items, >>> >> > and tell the recommendation what he reviews,and compute with the >>> reviews >>> >> > histories. >>> >> > >>> >> > 2)How to compute the items similarity dataset >>> >> > Without use items similarity dataset,we can make ItemBasedRecommender >>> >> > with PearsonCorrelationSimilarity,but >>> >> > we need to make recommendations with extra attributes of items, >>> >> > so we should use the items similarity dataset,how to build the >>> dataset is >>> >> > the key point. >>> >> > -- >>> >> > I'm samsam. >>> >> > >>> >> >>> > >>> > >>> > >>> > -- >>> > I'm samsam. >>> > >>> >> >> >> >> -- >> I'm samsam. >> > > > > -- > I'm samsam. >
