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

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

if use Text as the out format ,everything is ok.

maybe something is wrong with RecommendedItemsWritable or IdentityReducer.


public final class RecommenderMapper extends MapReduceBase implements
    Mapper<LongWritable,VectorWritable,Text,Text>

  private final Text user = new Text();
  private final Text recomScore = new Text();
  private static final String FIELD_SEPERATOR = ",";

    //output.collect(userID, new RecommendedItemsWritable(recommendations));
    for (RecommendedItem recommendation : recommendations)
    { 
        user.set(String.valueOf(userID)); 
        recomScore.set(recommendation.getItemID() + FIELD_SEPERATOR + 
recommendation.getValue()); 
        output.collect(user, recomScore); 
    } 

  JobConf recommenderConf = prepareJobConf(userVectorPath, outputPath,
      SequenceFileInputFormat.class, RecommenderMapper.class, Text.class,
      Text.class, IdentityReducer.class, Text.class,
      Text.class, TextOutputFormat.class);

> 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: 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