org.encog.ml.kmeans
Class KMeansClustering
- java.lang.Object
-
- org.encog.ml.kmeans.KMeansClustering
-
- All Implemented Interfaces:
- MLClustering, MLMethod
public class KMeansClustering extends java.lang.Object implements MLClustering
This class performs a basic K-Means clustering. This class can be used on either supervised or unsupervised data. For supervised data, the ideal values will be ignored. http://en.wikipedia.org/wiki/Kmeans
-
-
Constructor Summary
Constructors Constructor and Description KMeansClustering(int theK, MLDataSet theSet)Construct the K-Means object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MLCluster[]getClusters()voiditeration()Perform a single training iteration.voiditeration(int count)The number of iterations to perform.intnumClusters()
-
-
-
Constructor Detail
-
KMeansClustering
public KMeansClustering(int theK, MLDataSet theSet)Construct the K-Means object.- Parameters:
theK- The number of clusters to use.theSet- The dataset to cluster.
-
-
Method Detail
-
iteration
public final void iteration()
Perform a single training iteration.- Specified by:
iterationin interfaceMLClustering
-
iteration
public final void iteration(int count)
The number of iterations to perform.- Specified by:
iterationin interfaceMLClustering- Parameters:
count- The count of iterations.
-
getClusters
public MLCluster[] getClusters()
- Specified by:
getClustersin interfaceMLClustering- Returns:
- The clusters.
-
numClusters
public int numClusters()
- Specified by:
numClustersin interfaceMLClustering- Returns:
- The number of clusters.
-
-
DMelt 3.0 © DataMelt by jWork.ORG