| KMeansClusteringCluster(DoubleMatrix) Method |
Clusters the data into the specified number of clusters.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public ClusterSet Cluster(
DoubleMatrix centers
)
Public Function Cluster (
centers As DoubleMatrix
) As ClusterSet
public:
ClusterSet^ Cluster(
DoubleMatrix^ centers
)
member Cluster :
centers : DoubleMatrix -> ClusterSet
Parameters
- centers DoubleMatrix
- A matrix of initial cluster centers. K is
inferred from the number of rows in the matrix.
Return Value
ClusterSet
A ClusterSet that identifies the cluster into which each
object was grouped. Cluster numbers are based on row indices in
this.Data and
this.Centers.
Exceptions Exception | Condition |
---|
InvalidArgumentException |
Thrown if the number of cluster centers is less than one or greater than the number
of data points (this.N), or if the dimensionality of the centers is
not equal to the dimensionality of the data points.
|
NMathException |
Thrown if an empty cluster is encountered. Re-cluster with different starting centers.
|
See Also