If the data is 'really' there in the DataModel you seem to have ruled out all the differences. ;) I imagine there is something slightly amiss. Can you step through with a debugger to see what the UserSimilarity calculates? look what data it gets and see if it makes sense. If it seems to, double-check against FileDataModel. If you can say more about the difference maybe I can offer a better guess.
The Mongo-backed class is a bit of a toy. It loads all the data in memory. While that's handy just insofar as it lets you consume data that happens to be in Mongo, it's not any more scalable than something backed by a file. Anything real-time has to be in memory, really. Anything not real-time -- doesn't matter where your data is put since you're likely distributing with something like Hadoop, which consumes data in a linear and leisurely way. On Wed, Aug 1, 2012 at 8:37 PM, Winnu Ayi Satria <[email protected]> wrote: > Hi all, > > I am trying to combine MongoDB and Mahout using the same code in Mahout In > Action book, chapter 2. The very first code. But now I replaced the source, > user-item-preference, not from CSV file but from MongoDB. So the model is > instantiated from MongoDBDataModel, not FileDataModel anymore. The CSV file > has been copied to MongoDB. Everything is same, except how to create the > model. > > However, it doesn't work. The UserSimilarity class can not generate > similarity table from the data model. I checked the data inside the > instantiated model, and yes, all users, items, and preference do exist. Is > there something problem with MongoDBDataModel and UserSimilarity? > > I also tried the sample from here, > http://www.smartlab.at/articles/recommendation-engine/, that uses > SVDRecommender and it works. > > Too bad, not so many example or reference about MongoDBDataModel in > internet while combining Mahout and MongoDB would be interesting. > > Anyone has ever experienced with this problem? > > -- > Best regards, > > Winnu Ayi Satria
