Class KMeansCompute

  • All Implemented Interfaces:
    java.io.Serializable

    public class KMeansCompute
    extends Compute<Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>>,​double[]>
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      KMeansCompute()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>> aggregate​(Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>> input1, Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>> input2)
      Aggregates the output of the process() method to use in a group by
      Tuple2 process​(double[] input, ML4allModel model)
      Performs a computation at the data unit granularity
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KMeansCompute

        public KMeansCompute()
    • Method Detail

      • process

        public Tuple2 process​(double[] input,
                              ML4allModel model)
        Description copied from class: Compute
        Performs a computation at the data unit granularity
        Specified by:
        process in class Compute<Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>>,​double[]>
        Parameters:
        input - a data unit
      • aggregate

        public Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>> aggregate​(Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>> input1,
                                                                                                  Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>> input2)
        Description copied from class: Compute
        Aggregates the output of the process() method to use in a group by
        Specified by:
        aggregate in class Compute<Tuple2<java.lang.Integer,​Tuple2<java.lang.Integer,​double[]>>,​double[]>