Hi sebastian Thank you for your reply. I do not mean to precompute the candidate items for a user but each items' neighbors. I do not know whether this is an effective way. Because based on 10M dataset from grouplens, this method could take 8 seconds and I need to improve the performance.
>Hi Young, > >I don't know of a good way to precompute all candidate items for a user, >I don't think this makes sense as the data might become to large. But >the performance of getAllOtherItems(...) depends on the implementation >of DataModel you use. If all your preference data fits into memory (a >single preference needs 28 bytes according to Sean AFAIK) you could >think about exporting the preferences to a file and use the >FileDataModel implementation that loads all data into memory. > >--sebastian > >Am 20.07.2010 17:38, schrieb Young: >> Hi again, >> When I do the itembased recommendation, I find there are some latency in >> getAllOtherItems(long userID). Because it is calculating the items' >> neighbors and merge these neighbors together. So I am thinking if I >> precompute each item's neighbors and store in the database, then when I >> getAllOtherItems(), I could merge these neighbors directly. Is this useful >> for reducing the latency? >> Or is there other way to make the online-recommendation much faster? >> Thank you. >> >> >> >> >> >>> Yes you probably want a new, separate table. You have an extra step of >>> computing some notion of similarity anyway, and you probably want to >>> separate this table from your main data table anyhow for reasons of >>> performance and business logic separation. >>> >>> 2010/7/19 Young <[email protected]>: >>> >>>> So my prpblem is that I want to build datamodel based on what user has >>>> bought or added to their favorite or rated. >>>> You mean I need a table describe all these user behavior. For example, if >>>> user buys one item, I guess the user preference is 4 and add into this >>>> table? >>>> >>>> >>>> >>>> >>>> >>>>> No, you need one table (or view if you like) containing all data. If >>>>> you can't do this, you could write your own copy of a JDBCDataModel >>>>> that can query multiple tables, or, that changes its SQL queries to >>>>> use UNION statements. I imagine it will slow down a lot. >>>>> >>>>> If you mean, can you use a table with preferences with a model that >>>>> ignores preferences, sure you can. The extra column is ignored. >>>>> >>>>> 2010/7/19 Young <[email protected]>: >>>>> >>>>>> Hi, >>>>>> I have three tables, one is with preference and another two are without >>>>>> preference. Does mahout have some algorithm to integret these tables >>>>>> into one datamodel? >>>>>> >>>>>> Thank you >>>>>> >>>> >
