Package com.gpudb.protocol
Class AggregateKMeansResponse
- java.lang.Object
-
- com.gpudb.protocol.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 byGPUdb.aggregateKMeans.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregateKMeansResponse.InfoA set of string constants for theAggregateKMeansResponseparameterinfo.
-
Constructor Summary
Constructors Constructor Description AggregateKMeansResponse()Constructs an AggregateKMeansResponse object with default parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.longgetCount()The total count of all the clusters - will be the size of the input table.List<Long>getCounts()The number of elements in the cluster closest the corresponding k-means values.Map<String,String>getInfo()Additional information.List<List<Double>>getMeans()The k-mean values found.intgetNumIters()The number of iterations the algorithm executed before it quit.doublegetRmsDist()The sum of all the rms_dists - the value the k-means algorithm is attempting to minimize.List<Double>getRmsDists()The root mean squared distance of the elements in the cluster for each of the k-means values.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.doublegetTolerance()The distance between the last two iterations of the algorithm before it quit.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AggregateKMeansResponsesetCount(long count)The total count of all the clusters - will be the size of the input table.AggregateKMeansResponsesetCounts(List<Long> counts)The number of elements in the cluster closest the corresponding k-means values.AggregateKMeansResponsesetInfo(Map<String,String> info)Additional information.AggregateKMeansResponsesetMeans(List<List<Double>> means)The k-mean values found.AggregateKMeansResponsesetNumIters(int numIters)The number of iterations the algorithm executed before it quit.AggregateKMeansResponsesetRmsDist(double rmsDist)The sum of all the rms_dists - the value the k-means algorithm is attempting to minimize.AggregateKMeansResponsesetRmsDists(List<Double> rmsDists)The root mean squared distance of the elements in the cluster for each of the k-means values.AggregateKMeansResponsesetTolerance(double tolerance)The distance between the last two iterations of the algorithm before it quit.StringtoString()
-
-
-
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 formeans.- Returns:
thisto 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 forcounts.- Returns:
thisto 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 forrmsDists.- Returns:
thisto 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 forcount.- Returns:
thisto 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 forrmsDist.- Returns:
thisto 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 fortolerance.- Returns:
thisto 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 fornumIters.- Returns:
thisto mimic the builder pattern.
-
getInfo
public Map<String,String> getInfo()
Additional information.QUALIFIED_RESULT_TABLE_NAME: The fully qualified name of the result table (i.e. including the schema) used to store the results.
Map.- Returns:
- The current value of
info.
-
setInfo
public AggregateKMeansResponse setInfo(Map<String,String> info)
Additional information.QUALIFIED_RESULT_TABLE_NAME: The fully qualified name of the result table (i.e. including the schema) used to store the results.
Map.- Parameters:
info- The new value forinfo.- Returns:
thisto 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:
getSchemain interfaceorg.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:
getin interfaceorg.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:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-