mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amel Fraisse <amel.frai...@gmail.com>
Subject Re: Fastest way to compute compute correlation between users and generate new recommendations
Date Tue, 19 Oct 2010 13:00:43 GMT
In fact I am using the PearsonCorrelation to compute user correlation and
then I compute recommendations using Recommender class.
As follows:

DataModel model = new FileDataModel(new File("rating.txt"));

        if (model !=null) {
        LongPrimitiveIterator user = model.getUserIDs();
        }
        // compute PearsonCorrelation on the DataModel
        UserSimilarity userSimilarity = new
PearsonCorrelationSimilarity(model);

        //compute The k-Nearst Neighborhood of the current user
        UserNeighborhood neighborhood = new
NearestNUserNeighborhood(KNeighborhood, userSimilarity, model);

        //Get the top N recommendations
        Recommender recommender = new GenericUserBasedRecommender(model,
neighborhood, userSimilarity);


My question is that: How I refresh the DataModel when ratings are modified ?
it is possible to make calculation only on the delta file ?

And how I avoid to recompute user correlation and then recommendation when I
don't have any modification of  ratings?

Thank you.


2010/10/19 Sean Owen <srowen@gmail.com>

> If you specifically want a correlation, meaning the Pearson correlation,
> then you want to use PearsonCorrelationSimilarity. If you just mean you
> want
> some notion of similarity, then any implementation of UserSimilarity could
> be used. If speed is your concern, then I would try
> LogLikelihoodSimilarity.
>
> I am not sure if you want to compute correlations, or compute
> recommendations. To compute correlations, use PearsonCorrelationSimilarity
> on whatever pairs of users you like to get an answer. To compute
> recommendations, using an algorithm based on user-user similarity, then use
> GenericUserBasedRecommender.
>
> You can use any DataModel implementation. FileDataModel is fine.
>
> You can do whatever you like, including computing correlations ahead of
> time. You can use GenericUserSimilarity to feed in these pre-computed
> similarities for use in a Recommender.
>
> On Tue, Oct 19, 2010 at 12:42 PM, Amel Fraisse <amel.fraisse@gmail.com
> >wrote:
>
> > Hello,
> >
> > I am trying to use Mahout this day.
> > I wanted to ask about the fastest way to compute correlations between a
> > large number of users and recommend new recommendations?
> >
> > It is better to use a FileDataModel ?
> >
> > It is possible to precompute user correlation ? when I stock the result
> and
> > how i could use it?
> >
> > Thank you for your help.
> >
> >
> >
> >
> > --
> > --------------
> > Amel Fraisse
> >
>



-- 
--------------
Amel Fraisse

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