Class AggregateKMeansResponse

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class AggregateKMeansResponse
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of results returned by GPUdb.aggregateKMeans.
    • Constructor Detail

      • AggregateKMeansResponse

        public AggregateKMeansResponse()
        Constructs an AggregateKMeansResponse object with default parameters.
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Returns:
        The schema for the class.
      • getMeans

        public List<List<Double>> getMeans()
        The k-mean values found.
        Returns:
        The current value of means.
      • setMeans

        public AggregateKMeansResponse setMeans​(List<List<Double>> means)
        The k-mean values found.
        Parameters:
        means - The new value for means.
        Returns:
        this to mimic the builder pattern.
      • getCounts

        public List<Long> getCounts()
        The number of elements in the cluster closest the corresponding k-means values.
        Returns:
        The current value of counts.
      • setCounts

        public AggregateKMeansResponse setCounts​(List<Long> counts)
        The number of elements in the cluster closest the corresponding k-means values.
        Parameters:
        counts - The new value for counts.
        Returns:
        this to mimic the builder pattern.
      • getRmsDists

        public List<Double> getRmsDists()
        The root mean squared distance of the elements in the cluster for each of the k-means values.
        Returns:
        The current value of rmsDists.
      • setRmsDists

        public AggregateKMeansResponse setRmsDists​(List<Double> rmsDists)
        The root mean squared distance of the elements in the cluster for each of the k-means values.
        Parameters:
        rmsDists - The new value for rmsDists.
        Returns:
        this to mimic the builder pattern.
      • getCount

        public long getCount()
        The total count of all the clusters - will be the size of the input table.
        Returns:
        The current value of count.
      • setCount

        public AggregateKMeansResponse setCount​(long count)
        The total count of all the clusters - will be the size of the input table.
        Parameters:
        count - The new value for count.
        Returns:
        this to mimic the builder pattern.
      • getRmsDist

        public double getRmsDist()
        The sum of all the rms_dists - the value the k-means algorithm is attempting to minimize.
        Returns:
        The current value of rmsDist.
      • setRmsDist

        public AggregateKMeansResponse setRmsDist​(double rmsDist)
        The sum of all the rms_dists - the value the k-means algorithm is attempting to minimize.
        Parameters:
        rmsDist - The new value for rmsDist.
        Returns:
        this to mimic the builder pattern.
      • getTolerance

        public double getTolerance()
        The distance between the last two iterations of the algorithm before it quit.
        Returns:
        The current value of tolerance.
      • setTolerance

        public AggregateKMeansResponse setTolerance​(double tolerance)
        The distance between the last two iterations of the algorithm before it quit.
        Parameters:
        tolerance - The new value for tolerance.
        Returns:
        this to mimic the builder pattern.
      • getNumIters

        public int getNumIters()
        The number of iterations the algorithm executed before it quit.
        Returns:
        The current value of numIters.
      • setNumIters

        public AggregateKMeansResponse setNumIters​(int numIters)
        The number of iterations the algorithm executed before it quit.
        Parameters:
        numIters - The new value for numIters.
        Returns:
        this to mimic the builder pattern.
      • getInfo

        public Map<String,​String> getInfo()
        Additional information. The default value is an empty Map.
        Returns:
        The current value of info.
      • setInfo

        public AggregateKMeansResponse setInfo​(Map<String,​String> info)
        Additional information. The default value is an empty Map.
        Parameters:
        info - The new value for info.
        Returns:
        this to mimic the builder pattern.
      • getSchema

        public org.apache.avro.Schema getSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Returns:
        The schema object describing this class.
      • get

        public Object get​(int index)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to get
        Returns:
        value of the field with the given index.
        Throws:
        IndexOutOfBoundsException
      • put

        public void put​(int index,
                        Object value)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object