You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Jeff Zhang (JIRA)" <ji...@apache.org> on 2009/12/08 09:33:18 UTC

[jira] Updated: (MAHOUT-213) storeMapping should not been called when toLongID() is called

     [ https://issues.apache.org/jira/browse/MAHOUT-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Zhang updated MAHOUT-213:
------------------------------

    Attachment: Mahout_213.patch

> storeMapping should not been called when toLongID() is called
> -------------------------------------------------------------
>
>                 Key: MAHOUT-213
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-213
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Collaborative Filtering
>    Affects Versions: 0.4
>            Reporter: Jeff Zhang
>             Fix For: 0.4
>
>         Attachments: Mahout_213.patch
>
>
> In the trunk, storeMapping is called always when toLongID() is called. In my opinion storeMapping should been called only in method initialize().
> storeMapping will cost a lot when you use database to store the id mapping. I believe the code should like this:
> {code}
>   public void initialize(Iterable<String> stringIDs) throws TasteException {
>     for (String stringID : stringIDs) {
>       long longID = hash(stringID);
>       storeMapping(longID, stringID);
>     }
>   }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.