Assigns data to
k clusters, based upon
k user supplied centroids.
assignments = kmeansPredict(centroids, X);
assignments = kmeansPredict(mdl, X);
- kxP matrix of cluster centers.
- NxP matrix, the data to partition.
- An instance of
kmeansModelstructure returned from
- Nx1 matrix, containing the cluster to which each corresponding observation of
Xhas been assigned. Range = 1:k.