Are you giving it enough memory? I wonder whether you are nearly running out of heap and this is making it very very slow.
Just give it a bunch of heap with "-Xmx2048m" or something like that. (I'd also recommend Java 6 but that's not the issue here.) On Wed, Jul 14, 2010 at 9:18 PM, Sean Owen <[email protected]> wrote: > That's strange, since I've run the same data set and never seen > behavior like this. Yes I run on my laptop too, which is fairly > similar. > > Yes of course the time is consumed somewhere from recommend(), but > where? I think you'd want to get some clue about where within this > processing the time is being consumed. > > 2010/7/14 Young <[email protected]>: >> I tried the 10M dataset from grouplen. Is it the reason I do the project in >> my own laptop? It is Intel 2 core 2.4 GB, and RAM 3GB, and Win7 OS. >> And blow is profiled code. >> ----------------------------------------------------- >> //Precompute the model, itemSimilarity. >> DataModel model = new GroupLensDataModel(new File("ratings.dat")); >> ItemSimilarity itemSimilarity = null; >> try { >> itemSimilarity = new PearsonCorrelationSimilarity(model); >> } catch (TasteException e) { >> e.printStackTrace(); >> } >> Recommender recommender = new >> GenericItemBasedRecommender(model,itemSimilarity); >> ----------------------------------------- >> >> //Below method consume more than 1min to generate result. >> itembased_items = recommender.recommend(user_id, 10); >> -------------------------------------------------- >> Should I try slope-one? >> >> >> >> >> >
