KMeansTData, TDataSum Class |
public class KMeans<TData, TDataSum>
The KMeansTData, TDataSum type exposes the following members.
Name | Description | |
---|---|---|
KMeansTData, TDataSum | Initalize a new instance of KMeansTData, TDataSum. |
Name | Description | |
---|---|---|
ClusterCounts | Gets a list which contains the number of values in each of the clusters (length is numberOfClusters). | |
ClusterIndices | Gets a list with the same length as the number of data points, in which each element is the index of the cluster this data point is assigned to. | |
ClusterMeans | Gets a list which contains the mean values of the clusters (length is numberOfClusters). | |
Data | Gets a list which contains the data points provided. | |
HasPatchingEmptyClustersFailed | If true, during evaluation, empty clusters have appeared, which could not be patched with other data. | |
HasReachedMaximumNumberOfIterations | If true, the evaluation has reached the maximum number of iterations, without converging. | |
SortingOfClusterValues | Get/sets the sorting of cluster values after evaluation. It presumes that the generic type TDataSum implements the IComparable interface. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Evaluate | Clusters the provided data. Please note that the data are not normalized. Thus, for multidimensional data, please normalize the data before! | |
EvaluateClustersStandardDeviation | Evaluates for each cluster the standard deviation, i.e. the square root ( of the sum of squared distances divided by N-1) | |
EvaluateDaviesBouldinIndex(FuncTDataSum, TDataSum, Double) | Evaluates the Davies-Bouldin-Index. The exponent q (see EvaluateDaviesBouldinIndex(FuncTDataSum, TDataSum, Double, Int32)) is set to 1, meaning that the mean Euclidean distance of the points to their respective centroid is used in the nominator. | |
EvaluateDaviesBouldinIndex(FuncTDataSum, TDataSum, Double, Int32) | Evaluates the Davies-Bouldin-Index. The exponent q (used to calculate the average distance of the cluster points to their centroid) can be set as parameter. | |
EvaluateMean2ndMomentOfDistances | Evaluates for each cluster the 2nd moment of the distances, i.e. the square root of the average of the squared Euclidean distances (or whatever the distance function is) of the points to their respective centroid. | |
EvaluateMeanDistances | Evaluates for each cluster the mean distance, i.e. the average of the Euclidean distances (or whatever the distance function is) of the points to their respective centroid. | |
EvaluateMeanNthMomentOfDistances | Evaluates for each cluster the mean distance, i.e. the square root ( of the sum of squared distances divided by N) | |
EvaluateSumOfSquaredDistancesToClusterMean | Evaluates the sum of (squared distance of each point to its cluster center). | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetFarthestPoint | Returns the index of the point that is farthest outside the mean of its cluster. | |
GetFarthestPointOfBiggestCluster | Returns the index of the point that is farthest outside the mean of its cluster. | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
InitializeCentroidsAtRandom | Initialize the centroids with a randomly choosen value from the data set. Initializing in this way gives poor clustering results, thus we don't use it currently. Advantage: much faster than InitializeCentroidsUsingKMeansPlusPlus. | |
InitializeCentroidsUsingKMeansPlusPlus | Initializes the cluster mean values using the KMeans++ procedure (http://en.wikipedia.org/wiki/K-means%2B%2B). This is slower than InitializeCentroidsAtRandom, but after initializing in this way, significant lesser iterations are neccessary. | |
InternalEvaluateMeanNthMomentOfDistances | Evaluates for each cluster the 2nd moment of the distances, i.e. the square root of the average of the squared Euclidean distances (or whatever the distance function is) of the points to their respective centroid. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
PatchEmptyClusters | Tries to fill up empty clusters, by searching the biggest cluster, and then use the farthest point from that biggest cluster to move to the empty cluster. | |
ToString | Returns a string that represents the current object. (Inherited from Object) | |
TryEvaluate | Clusters the provided data. Please note that the data are not normalized. Thus, for multidimensional data, please normalize the data before! | |
UpdateClusterMeanValues | Calculates the mean values of the clusters from the data points. | |
UpdateEachPointsMembership | Iterates over each data point, and determines to which cluster it belongs. |