frog
Class KmeansParameters

java.lang.Object
  extended by frog.KmeansParameters
All Implemented Interfaces:
Serializable

public class KmeansParameters
extends Object
implements Serializable

KmeansParameters is a simple record class for easier passing of Kmeans parameters. It contains the number of means, the k-means algorithm training threshold, and a boolean for whether to use the ++ variant.

Author:
Team Better Recognize
See Also:
Serialized Form

Constructor Summary
KmeansParameters()
          Constructs a set of Kmeans parameters with default settings.
KmeansParameters(int nm, double t, boolean pp)
          Constructs a set of Kmeans parameters with a given number of means, training threshold, and k-means++ boolean (++ is used on true, not used on false)
 
Method Summary
 int getNumMeans()
          Accessor for the number of means
 double getThreshold()
          Accessor for the training threshold.
 boolean getUsingPlusPlus()
          Accessor for the k-means++ boolean
 void setNumMeans(int nm)
          Sets the number of means.
 void setThreshold(double t)
          Sets the training threshold.
 void setUsingPlusPlus(boolean pp)
          Sets the k-means++ boolean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KmeansParameters

public KmeansParameters()
Constructs a set of Kmeans parameters with default settings.


KmeansParameters

public KmeansParameters(int nm,
                        double t,
                        boolean pp)
Constructs a set of Kmeans parameters with a given number of means, training threshold, and k-means++ boolean (++ is used on true, not used on false)

Parameters:
nm - the number of means
t - the training threshold
pp - whether to use k-means++ (true) or not (false)
Method Detail

getNumMeans

public int getNumMeans()
Accessor for the number of means

Returns:
the nubmer of means

setNumMeans

public void setNumMeans(int nm)
Sets the number of means.

Parameters:
nm - the value for setting the number of means

getThreshold

public double getThreshold()
Accessor for the training threshold.

Returns:
the training threshold

setThreshold

public void setThreshold(double t)
Sets the training threshold.

Parameters:
t - the value for setting the training threshold

getUsingPlusPlus

public boolean getUsingPlusPlus()
Accessor for the k-means++ boolean

Returns:
whether k-means++ is being used (true) or not (false)

setUsingPlusPlus

public void setUsingPlusPlus(boolean pp)
Sets the k-means++ boolean

Parameters:
pp - the boolean for setting the k-means++ boolean