mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samsam <yangua...@gmail.com>
Subject Re: Re: Re: Re: Re: Recommend for anonymous users
Date Thu, 15 Jul 2010 06:55:19 GMT
sometimes,I get this error
----------------------------------

java.lang.IllegalArgumentException: size is less than 1
	org.apache.mahout.cf.taste.impl.model.GenericItemPreferenceArray.<init>(GenericItemPreferenceArray.java:49)
	org.apache.mahout.cf.taste.impl.model.GenericItemPreferenceArray.<init>(GenericItemPreferenceArray.java:56)
	org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel.getPreferencesForItem(AbstractJDBCDataModel.java:441)
	org.apache.mahout.cf.taste.impl.model.PlusAnonymousUserDataModel.getPreferencesForItem(PlusAnonymousUserDataModel.java:124)
	org.apache.mahout.cf.taste.impl.recommender.AbstractRecommender.getAllOtherItems(AbstractRecommender.java:107)
	org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.recommend(GenericItemBasedRecommender.java:98)
	net.gamestreamer.recommendation.AnonymousRecommender.recommend(AnonymousRecommender.java:66)
	net.gamestreamer.recommendation.AnonymousRecommender.recommend(AnonymousRecommender.java:39)
	net.gamestreamer.recommendation.AnonymousRecommender.recommend(AnonymousRecommender.java:52)
	net.gamestreamer.recommendation.servlet.AnonymousRecommenderServlet.doGet(AnonymousRecommenderServlet.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

----------------------

I don't know what's the problem.


On Thu, Jul 15, 2010 at 4:20 AM, Sean Owen <srowen@gmail.com> wrote:

> 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 <srowen@gmail.com> 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 <woshidustin@126.com>:
> >> 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?
> >>
> >>
> >>
> >>
> >>
> >
>



-- 
I'm samsam.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message