How many unique items? That result really doesn't look right to me. I don't have a good guess looking purely at the code. I think you would have to profile it, and figure out where it is spending so much time. With that more information maybe we can figure it out.
Sean 2010/7/14 Young <[email protected]>: > Hi Sean, > Thank you for your reply. > My items are 100k and users are 100k and each users are expected have 200 > ratings and total ratings are 20 million. > Here is the time. > Constructing datamodel using time:150968 > Calculating the similarity using time:5 > Constructing recommender using time: 5 > Please enter user_id > 9 > Time Used:620ms > Please enter user_id > 2 > Time Used:369367ms > > So based on this situation, what should I do next? > > > > > > >>That looks basically sound. You probably want to wrap the >>PearsonCorrelationSimilarity in a CachingItemSimilarity. >> >>You may also simply wish to try a different algorithm. What's the data >>like? if it has lots of items, this is not the best choice. >> >>Next step here would be to profile to see where the time is spent. You >>might just debug, and pause the processing periodically to see where >>the thread is. That may show where time is spent. >> >>2010/7/14 Young <[email protected]>: >>> Thanks, Sean. Below is my code. >>> >
