C# Class Encog.ML.Kmeans.KMeansClustering

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
Inheritance: IMLClustering
Show file Open project: encog/encog-silverlight-core Class Usage Examples

Public Methods

Method Description
CalculateEuclideanDistance ( Centroid c, IMLData data ) : double

Calculate the euclidean distance between a centroid and data.

Iteration ( ) : void

Perform a single training iteration.

Iteration ( int count ) : void

The number of iterations to perform.

KMeansClustering ( int k, IMLDataSet theSet ) : System

Construct the K-Means object.

NumClusters ( ) : int

Private Methods

Method Description
CalcWcss ( ) : void

Calculate the within-cluster sum of squares (WCSS).

GetMaxValue ( int index ) : double

Get the maximum, over all the data, for the specified index.

GetMinValue ( int index ) : double

Get the minimum, over all the data, for the specified index.

SetInitialCentroids ( ) : void

Setup the initial centroids.

Method Details

CalculateEuclideanDistance() public static method

Calculate the euclidean distance between a centroid and data.
public static CalculateEuclideanDistance ( Centroid c, IMLData data ) : double
c Centroid The centroid to use.
data IMLData The data to use.
return double

Iteration() public method

Perform a single training iteration.
public Iteration ( ) : void
return void

Iteration() public method

The number of iterations to perform.
public Iteration ( int count ) : void
count int
return void

KMeansClustering() public method

Construct the K-Means object.
public KMeansClustering ( int k, IMLDataSet theSet ) : System
k int The number of clusters to use.
theSet IMLDataSet The dataset to cluster.
return System

NumClusters() public method

public NumClusters ( ) : int
return int