[ 
https://issues.apache.org/jira/browse/MAHOUT-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854413#action_12854413
 ] 

Hui Wen Han commented on MAHOUT-358:
------------------------------------

the simple way to resolve the issue is that construct the output in 
RecommenderMapper and not use custom writable

private final Text user = new Text();
private final Text recomScore = new Text();


StringBuilder result = new StringBuilder(200);
result.append('[');
boolean first = true;
for (RecommendedItem item : recommendations) {
if (first) { first = false; } 
else { result.append(','); }
result.append(item.getItemID());
result.append(':');
result.append(item.getValue());
}
result.append(']');
user.set(String.valueOf(userID)); 
recomScore.set(result.toString);
output.collect(userID, recomScore);


> the pref value  field of output of 
> org.apache.mahout.cf.taste.hadoop.item.RecommenderJob has negative
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-358
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-358
>             Project: Mahout
>          Issue Type: Test
>          Components: Collaborative Filtering
>    Affects Versions: 0.4
>            Reporter: Hui Wen Han
>         Attachments: 20100407_steer_item_out_part-00000, 
> attempt_201004011623_0070_m_000000_0.htm, screenshot-1.jpg, screenshot-2.jpg
>
>
> In my test the input pref values all is positive.
> the output score value has negative value ,

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to