mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Nassau <jonathan.nas...@gmail.com>
Subject Mahout Performance Issues with Item Based Recommender
Date Tue, 24 Jul 2012 20:07:01 GMT
I may have sent this already if so I apologize for the duplicate


I’m writing an item based recommender and am getting extreme bottlenecks on
my speed during the “doGetCandidateItems”  I’m open to *any *suggestions on
how to improve the speed because right now it’s taking over an hour which
makes no sense.  Even if I use a .txt as my dataModel is it very slow.

The table has all the preferences (1000) for every single user (115000) and
there are an average of only (50) prefs for user.

The full table will obviously have more than this but that’s the very small
subset I’m using.



I want to recommend items and use RecommendedBecause() on each item to give
some detail about each recommendation but with the speed like this I can’t
even do that.


Thanks so much code is below,

Jonathan





                        MySQLJDBCDataModel dataModel=*null*;

                        *try* {

                                    Class.*forName*(
"net.sourceforge.jtds.jdbc.Driver");


net.sourceforge.jtds.jdbcx.JtdsDataSource ds =*new*
 net.sourceforge.jtds.jdbcx.JtdsDataSource();

                                    ds.setServerName("xxxx");

                                    ds.setDatabaseName("xxxx");

                                    ds.setUser("xxxx");

                                    ds.setPassword(*password*);

                                    ds.setDomain("xxxx");







                                    dataModel = *new* MySQLJDBCDataModel(

                                                            ds, "test_tbl",
"user_id",

                                                            "item_id",
"preference",*null*);



                        } *catch*(Exception e) {System.*out*.println("can't
connect");}




                        ItemSimilarity similarity = *new*
 FileItemSimilarity(*new*File("output/part-r-00000"));

                        ItemBasedRecommender recommender =
*new*GenericItemBasedRecommender(dataModel,
similarity);

                        Recommender cachingRecommender = *new*
 CachingRecommender(recommender);

                        List<RecommendedItem>
uRec=cachingRecommender.recommend(userid,10);

                        System.*out*.print("Recommendations:"+
uRec);

            }

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