On Tue, Jun 22, 2010 at 3:43 PM, Sean Owen wrote: > So "users" are items and "items" are item-features? Sure, you can do > that. I don't think you need a full recommender though. That would > recommend new features to items or something. Instead, with the input, > you can use standard collaborative filtering similarity metrics to > determine some notion of item-item similarity. > Yes. > And then return to your real users and items, with that item-item > similarity, and proceed to recommend. > > One can discover content based item-to-item similarities from that model, find most similar items to the items that target user's history contains, aggregate results and return, to recommend items to a user based on content. > Sure that's a fine idea. > > On Tue, Jun 22, 2010 at 1:39 PM, Gökhan Çapan wrote: > > Sean, may the following approach be useful? > > You can create item vectors whose dimensions are content attributes, and > use > > the framework as if you are implementing a recommender. > > > > your data may be structured as > > *item_id, content_feature_id* > > > > instead of > > *user_id, item_id* > > > > and you can find similar items in terms of content features using a > > Recommender > > > > On Tue, Jun 22, 2010 at 3:11 PM, Sean Owen wrote: > > > >> This is the part that is more up to you, and outside the framework. > >> > >> Let's say you have movies as items. Let's say you want to use their > >> genre and director (content, attributes) to define some idea of > >> similarity. Maybe you make up the following rule: > >> > >> if genres are the same, add 0.1 to similarity > >> if directors are the same, add 0.5 to similarity > >> > >> You could easily write code something like this to implement this > >> notion of item-item similarity. (This is not a 100% complete example > >> but shows most of what you need.) > >> > >> class MyItemSimilarity implements ItemSimilarity { > >> ... > >> public double itemSimilarity(long itemID1, long itemID2) { > >> MyMovie movie1 = lookupMyMovie(itemID1); > >> MyMovie movie2 = lookupMyMovie(itemID2); > >> double similarity = 0.0; > >> if (movie1.getGenre().equals(movie2.getGenre()) { > >> similarity += 0.1; > >> } > >> if (movie1.getDirector().equals(movie2.getDirector())) { > >> similarity += 0.5; > >> } > >> return similarity; > >> } > >> ... > >> } > >> > >> > >> And that's about it. You then use this ItemSimilarity instead of > >> something like LogLikelihoodSimilarity or other implementations with a > >> GenericItemBasedRecommender. > >> There you go, this is as far as you have to go to do content-based > >> recommendation in the framework. > >> > >> Because the hooks are pretty easy to use, and the logic above is so > >> domain-specific, that's a pretty good "bright line" between CF and > >> content-based recommendation that the framework itself doesn't cross. > >> > >> Well, this is at least one form of content-based recommendation. > >> > >> > >> > >> > >> > >> On Mon, Jun 21, 2010 at 2:08 PM, samsam wrote: > >> > I know mahout have not supported content-based recommender,but I want > to > >> > recommend with item's specific attributes,so who can introduce the > >> > implemention of content-based recommender? The book > >> > mentions that it can be implemented base on item-based recommender,but > I > >> > don't know how to do it specifically. > >> > > >> > And someone metioned that I should compute item-item similarities > based > >> on > >> > their attributes first,and how to compute it? > >> > > >> > -- > >> > I'm samsam. > >> > > >> > > > > > > > > -- > > Gökhan Çapan > > > -- Gökhan Çapan