mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Zhang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MAHOUT-213) storeMapping should not been called when toLongID() is called
Date Tue, 08 Dec 2009 08:35:18 GMT

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

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

    Status: Patch Available  (was: Open)

> 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
>
>
> 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.


Mime
View raw message