## org.apache.mahout.math.hadoop.similarity
Class RowSimilarityJob.SimilarityReducer

    java.lang.Object
      org.apache.hadoop.mapreduce.Reducer<WeightedRowPair,Cooccurrence,SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable>
          org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.SimilarityReducer

Enclosing class:
  RowSimilarityJob

    public static class RowSimilarityJob.SimilarityReducer

extends org.apache.hadoop.mapreduce.Reducer<WeightedRowPair,Cooccurrence,SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable>

computes the pairwise similarities

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
`org.apache.hadoop.mapreduce.Reducer.Context`

Constructor Summary
`RowSimilarityJob.SimilarityReducer()`

Method Summary
`protected void` `reduce(WeightedRowPair rowPair, java.lang.Iterable<Cooccurrence> cooccurrences, org.apache.hadoop.mapreduce.Reducer.Context ctx)`
`protected void` `setup(org.apache.hadoop.mapreduce.Reducer.Context ctx)`

Methods inherited from class org.apache.hadoop.mapreduce.Reducer
`cleanup, run`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RowSimilarityJob.SimilarityReducer

    public RowSimilarityJob.SimilarityReducer()

Method Detail

### setup

    protected void setup(org.apache.hadoop.mapreduce.Reducer.Context ctx)
                  throws java.io.IOException,
                         java.lang.InterruptedException

  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Reducer<WeightedRowPair,Cooccurrence,SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

### reduce

    protected void reduce(WeightedRowPair rowPair,
                          java.lang.Iterable<Cooccurrence> cooccurrences,
                          org.apache.hadoop.mapreduce.Reducer.Context ctx)
                   throws java.io.IOException,
                          java.lang.InterruptedException

  Overrides:
    `reduce` in class `org.apache.hadoop.mapreduce.Reducer<WeightedRowPair,Cooccurrence,SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable>`
  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.