Package org.apache.mahout.clustering.spectral.common.UnitVectorizerJob

Examples of org.apache.mahout.clustering.spectral.common.UnitVectorizerJob.UnitVectorizerMapper.map()


   
    // perform the mapping
    for (int i = 0; i < RAW.length; i++) {
      Vector vector = new RandomAccessSparseVector(RAW[i].length);
      vector.assign(RAW[i]);
      mapper.map(new IntWritable(i), new VectorWritable(vector), context);
    }
   
    // check the results
    assertEquals("Number of map results", RAW.length, writer.getData().size());
    for (int i = 0; i < RAW.length; i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.