Sean Owen schrieb:
On Mon, Jul 13, 2009 at 2:48 PM, Thomas Rewig<[email protected]> wrote:
       *** "Pre"-Recommender ***
      // set the model for the ItemItemMatrix
      this.similarityModel = new MySQLJDBCDataModel(cPoolDS,
preferenceTable, userIDColumn, itemIDColumn, preferenceColumn);

      // set the model for the Recommender
      this.model = new MySQLJDBCDataModel(cPoolDS, preferenceTable,
userIDColumn, itemIDColumn, preferenceColumn);

Hmm, this doesn't look right. You are using the exact same table and
columns in both cases. I thought that above, your "users" were items
and "items" were item attributes, and in the second case, your "users"
are actual users and "items" are items.

Oh sorry, I just copy the code snippets, actually thats all several methods controlled by a controller ... the tables and columns are not the same, I just haven't been attentive and adjust this for the example. My fault sorry.

          // Cast to itemSimilarity because the "Users" in the
"Pre"-Recommender are Items
      this.cachingItemSimilarity = (CachingItemSimilarity)
this.cachingUserSimilarity;

I don't understand why you are trying to do this? there are two
classes available, CachingItemSimilarity and CachingUserSimilarity.
There should be no need to force one to be the other.
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);

Here I get a recommender for the users based at the *item-attributes*-similarity from the pre-recommender-model and that won't make sense because I need the *item*-similarity from the pre-recommender-model. The item-similarity of the pre-recommender I can only compute with a UserSimilarity, but I can't get a UserSimilarity in a CaschingItemSimilarity respectively the ItemBasedRecommender. Where is my mistake?

Anyway I can precompute with taste the item-item-matrix in a first step. And in a second step I can recommend with that matrix and the userdata other items to a user. To do that all "on the fly" isn't so importent at the moment.

I think I will test a little bit with lucene as Ted suggested to increase the speed of step two. That sounds very interesting.

Thomas

Reply via email to