org.encog.util.kmeans
Class KMeansUtil<K extends CentroidFactory<? super K>>
- java.lang.Object
-
- org.encog.util.kmeans.KMeansUtil<K>
-
- Type Parameters:
K- The type to cluster.
public class KMeansUtil<K extends CentroidFactory<? super K>> extends java.lang.ObjectGeneric KMeans clustering object.
-
-
Constructor Summary
Constructors Constructor and Description KMeansUtil(int theK, java.util.List<? extends K> theElements)Construct the clusters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Collection<K>get(int index)Get a cluster by index.Cluster<K>getCluster(int i)Get a cluster by index.voidprocess()Perform the cluster.intsize()
-
-
-
Constructor Detail
-
KMeansUtil
public KMeansUtil(int theK, java.util.List<? extends K> theElements)Construct the clusters. Call process to perform the cluster.- Parameters:
theK- The number of clusters.theElements- The elements to cluster.
-
-
Method Detail
-
process
public void process()
Perform the cluster.
-
get
public java.util.Collection<K> get(int index)
Get a cluster by index.- Parameters:
index- The index to get.- Returns:
- The cluster.
-
size
public int size()
- Returns:
- The number of clusters.
-
-
DMelt 3.0 © DataMelt by jWork.ORG