Nevermind. I see now that the userID is supposed to come first. Did this change recently? I'm on 0.5-SNAPSHOT.. and I could swear it used to be itemID first..
--Matthew On Fri, Feb 4, 2011 at 2:33 PM, Matthew Runo <[email protected]> wrote: > Hello - > > I took a quick stab at precomputing item-item similarities recently, > and it seems like I'm not getting the itemIDs that I should be: > > Iterator iter = dataModel.getItemIDs(); > while( iter.hasNext() ){ > long item1 = (Long) iter.next(); > > Iterator inner = dataModel.getItemIDs(); > while( inner.hasNext() ){ > long item2 = (Long) inner.next(); > cache.add( > new GenericItemSimilarity.ItemItemSimilarity(item1, > item2, itemSimilarity.itemSimilarity(item1, item2)) > ); > ... > > I get an itemID that is not found in my input data at all. I do, > however, find it as a userID. My data is currently a flat file: > > itemID,userID,time,pref > > for example.. > > 705540,3472328326359560240,1288681200,10 > > I can only assume that this is not the proper way to loop through all > the itemIDs inside the dataModel. How would you do that? I'd expect to > get 705540 from the line above.. > > Thanks for your time! > > Matthew Runo >
