You are here: Start » AVL.NET » AVL.ClusterData_KMeans
AVL.ClusterData_KMeans
Clusters data using KMeans algorithm.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void ClusterData_KMeans ( IList<IList<float>> inData, int inClusters, int inMaxIterations, int inSeed, float inTerminationFactor, AvlNet.KMeansClusteringMethod inClusteringMethod, AvlNet.Matrix outCentroids, IList<int> outPointToClusterAssignment, out float outDistanceSum )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inData | System.Collections.Generic.IList<System.Collections.Generic.IList<float>> | Data set, array of examples. | |||
inClusters | int | <2, +INF> | 2 | Number of clusters to extract. Default value: 2. | |
inMaxIterations | int | <10, 1000> | 200 | Maximal number of procedure iterations. Default value: 200. | |
inSeed | int | <0, INF> | 5489 | Seed to init random engine. Default value: 5489. | |
inTerminationFactor | float | <1.0f, 2.0f> | 1.5f | Additional factor of procedure stop. Default value: 1.5f. | |
inClusteringMethod | AvlNet.KMeansClusteringMethod | KMeansPlusPlus | KMeans variant to use. Default value: KMeansPlusPlus. | ||
outCentroids | AvlNet.Matrix | Resulting centroid points in feature space. | |||
outPointToClusterAssignment | System.Collections.Generic.IList<int> | Array of input point assignments to generated clusters. | |||
outDistanceSum | float | Sum of squared distances from points to its respective cluster centroids. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Cannot make more clusters than there is data in input dataset in ClusterData_KMeans. |
DomainError | Empty dataset on input in ClusterData_KMeans. |
DomainError | Inconsistent number of data coordinates in input dataset in ClusterData_KMeans. |