-Re: Mahout 0.4 seems recommend user's existed items to user.
Sebastian Schelter 2011-01-14, 12:39
It's hard to see from the sources how the users' already preferred items
(#3) are excluded from the final results but it's definitely done.
I'll walk you through the code:
In SimilarityMatrixRowWrapperMapper.map() we map all similar items for
each item as a vector, notice that the similarity value of each item to
itself is set to NaN here.
When AggregateAndRecommender computes the final recommendations, it
receives a PrefAndSimilarityColumnWritable for each item preferred by
the user. Those similarity vectors and preference values are used to
compute the weighted sum that gives the prediction value for each item
For each item that has already been preferred by the user we can be sure
that there is the NaN value from above added to its sum which makes it
NaN too. Finally all NaN predictions are explicitly filtered in
On 14.01.2011 11:19, han henry wrote:
> Hi,Sean and sebastian
> We have two type preference .
> 1) ,Preferences that user does not want to see them ,we store those
> preference in filterFile.
> 2) ,All preferences (include those in the #1) ,also those data can use to
> calculate similarity.
> We can not recommend those items to user
> #1, Invalid items or expired items .we store those items in itemSFile.
> #2, User Non-interested items ,we store those user ,item pairs in filterFile
> #3, User existed items (user already has those item in preferences ).
> ItemFilterAsVectorAndPrefsReducer seems can make those items been skiped
> in last step.
> so we do #1 and #2 in the last step
> but I have not found logic to skip #3.
> Am I right ?
> Best Regards,
> 2011/1/14 han henry<[EMAIL PROTECTED]>
>> Thank you Sean and sebastian :)
>> 2011/1/14 Sean Owen<[EMAIL PROTECTED]>
>> Look at ItemFilterAsVectorAndPrefsReducer. This does what you are looking
>>> On Fri, Jan 14, 2011 at 9:17 AM, han henry<[EMAIL PROTECTED]> wrote:
>>>> Because my data is on the production ,it 's very large .so sorry that I
>>>> not give you input data.
>>>> But we can try to review the code .
>>>> The initial version cooccurence arithmetic has logic to skip user's
>>>> Best Regards,