I am getting this warning message while executing the k means cluster algorithm ?

6 views (last 30 days)
Warning: Failed to converge in 100 iterations.
> In kmeans/loopBody (line 479)
In internal.stats.parallel.smartForReduce (line 136)
In kmeans (line 343)
In sav (line 27)
  3 Comments
MINO GEORGE
MINO GEORGE on 18 Jun 2021
The coding for k means algorithm is here
numberOfClusters = 7;
grayLevels = double(g(:));
[clusterIndexes, clusterCenters] = kmeans(grayLevels, numberOfClusters,...
'distance', 'sqEuclidean', ...
'Replicates', 2);
labeledImage = reshape(clusterIndexes, rows, columns);

Sign in to comment.

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!