You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Mark <st...@gmail.com> on 2011/03/13 06:45:52 UTC

Precomputation

I've just created some precomputed item-similarities using 
ItemSimilarityJob (LogLikelihoodSimilarity w/ boolean prefs). My 
understanding is that I can create a similarity class using 
FileItemSimilarity but what recommender should I be using with this? All 
the recommenders that I know of take a DataModel and it seems kind of 
redundant to create a FileDataModel using the same precomputed 
item-similarities.

Can someone please explain to me how to use precomputed similarities? 
Also what are some other similarities/recommendations I can precompute 
ahead of time?

Thanks

Re: Precomputation

Posted by Mark <st...@gmail.com>.
Ok so the inputs are completely different. That makes sense.

Thanks for the help

On 3/13/11 5:16 AM, Sebastian Schelter wrote:
> Hi Mark,
>
> the DataModel is not created with the precomputed similarities but 
> with the original preference data, here is how you would set up a 
> recommender with precomputed item-similarities:
>
>     DataModel dataModel = new FileDataModel(new 
> File("/path/to/preferences.txt"));
>     ItemSimilarity similarity = new FileItemSimilarity(new 
> File("/path/to/similarities.txt"));
>     ItemBasedRecommender recommender = new 
> GenericItemBasedRecommender(dataModel, similarity);
>
>
> --sebastian
>
>
> On 13.03.2011 06:45, Mark wrote:
>> I've just created some precomputed item-similarities using 
>> ItemSimilarityJob (LogLikelihoodSimilarity w/ boolean prefs). My 
>> understanding is that I can create a similarity class using 
>> FileItemSimilarity but what recommender should I be using with this? 
>> All the recommenders that I know of take a DataModel and it seems 
>> kind of redundant to create a FileDataModel using the same 
>> precomputed item-similarities.
>>
>> Can someone please explain to me how to use precomputed similarities? 
>> Also what are some other similarities/recommendations I can 
>> precompute ahead of time?
>>
>> Thanks
>
>

Re: Precomputation

Posted by Sebastian Schelter <ss...@apache.org>.
Hi Mark,

the DataModel is not created with the precomputed similarities but with 
the original preference data, here is how you would set up a recommender 
with precomputed item-similarities:

     DataModel dataModel = new FileDataModel(new 
File("/path/to/preferences.txt"));
     ItemSimilarity similarity = new FileItemSimilarity(new 
File("/path/to/similarities.txt"));
     ItemBasedRecommender recommender = new 
GenericItemBasedRecommender(dataModel, similarity);


--sebastian


On 13.03.2011 06:45, Mark wrote:
> I've just created some precomputed item-similarities using 
> ItemSimilarityJob (LogLikelihoodSimilarity w/ boolean prefs). My 
> understanding is that I can create a similarity class using 
> FileItemSimilarity but what recommender should I be using with this? 
> All the recommenders that I know of take a DataModel and it seems kind 
> of redundant to create a FileDataModel using the same precomputed 
> item-similarities.
>
> Can someone please explain to me how to use precomputed similarities? 
> Also what are some other similarities/recommendations I can precompute 
> ahead of time?
>
> Thanks



Re: Precomputation

Posted by Sean Owen <sr...@gmail.com>.
Well you'd use it with an algorithm that needs an ItemSimilarity, and
those are item-based recommenders like GenericItemBasedRecommender.

You also need to supply a DataModel since it is needed for reading
ratings and such. It will not be used to compute item-item similarity
since you are supplying and implementation that reads those from disk.

On Sun, Mar 13, 2011 at 5:45 AM, Mark <st...@gmail.com> wrote:
> I've just created some precomputed item-similarities using ItemSimilarityJob
> (LogLikelihoodSimilarity w/ boolean prefs). My understanding is that I can
> create a similarity class using FileItemSimilarity but what recommender
> should I be using with this? All the recommenders that I know of take a
> DataModel and it seems kind of redundant to create a FileDataModel using the
> same precomputed item-similarities.
>
> Can someone please explain to me how to use precomputed similarities? Also
> what are some other similarities/recommendations I can precompute ahead of
> time?
>
> Thanks
>