Sean Owen schrieb:
On Tue, Jul 14, 2009 at 10:58 AM, Thomas Rewig<[email protected]> wrote:
Because I need a UserSimilarity to precompute. Maybe I overlook a importent
detail, but if I do it in that way to compute all on the fly in a item-based
way:

      *** "Pre"-Recommender ***
      // set the model for the ItemItemMatrix
     this.similarityModel = new MySQLJDBCDataModel(cPoolDS,
preferenceTableSim, userIDColumnSim, itemIDColumnSim, preferenceColumnSim);
      // set the "ItemSimilarity" for the ItemItemMatrix
     this.similarityItemSimilarity = new
EuclideanDistanceSimilarity(this.similarityModel);
      // set CaschingSimilarity
     this.cachingItemSimilarity = new
CachingItemSimilarity(this.similarityItemSimilarity, this.similarityModel);
      *** Recommender ***
     // set the model for the Recommender
     this.model = new MySQLJDBCDataModel(cPoolDS, preferenceTable,
userIDColumn, itemIDColumn, preferenceColumn);
     // set the Recommender with the *cachingItemSimilarity*
     this.recommender = new GenericUserBasedRecommender(this.model,
this.cachingItemSimilarity);

But why are you using a user-based recommender here? I thought you
were using an item-based recommender, in the end, to produce actual
recommendations. Yes, of course you do not plug in an item-similarity
metric into a user-based recommender.

User GenericItemBasedRecommender.
Oh I think I need a coffee ... in my code it is a GenericItemBasedRecommender, I have to improve my copy&paste ...

this.recommender = new 
GenericItemBasedRecommender(this.model,this.cachingItemSimilarity);

Reply via email to