mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Content-based Recommender Implementation
Date Tue, 22 Jun 2010 16:00:07 GMT
You can also recommend attributes to users by reducing the user, item
history file to a user, attribute history file.  Once you have recommended
attributes, you can use a search engine or an attribute to item
recommendation engine to get the items to recommend.

On Tue, Jun 22, 2010 at 5:43 AM, Sean Owen <srowen@gmail.com> 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.
>
> And then return to your real users and items, with that item-item
> similarity, and proceed to recommend.
>
> Sure that's a fine idea.
>
> On Tue, Jun 22, 2010 at 1:39 PM, Gökhan Çapan <gkhncpn@gmail.com> 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 <srowen@gmail.com> 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 <yanguango@gmail.com> 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 <mahout in action>
> >> > 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
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message