Example usage for org.apache.mahout.math.hadoop.similarity.cooccurrence Vectors sum

List of usage examples for org.apache.mahout.math.hadoop.similarity.cooccurrence Vectors sum

Introduction

In this page you can find the example usage for org.apache.mahout.math.hadoop.similarity.cooccurrence Vectors sum.

Prototype

public static Vector sum(Iterator<VectorWritable> vectors) 

Source Link

Usage

From source file:com.ctrip.gs.recommendation.itemcf.mapreduce.VectorSumReducer.java

License:Apache License

@Override
protected void reduce(WritableComparable<?> key, Iterable<VectorWritable> values, Context ctx)
        throws IOException, InterruptedException {
    ctx.write(key, new VectorWritable(Vectors.sum(values.iterator())));
}