error occurred while executing a kmeans function

Error using kmeans/batchUpdate (line 376) Empty cluster created at iteration 1.
Error in kmeans (line 280) converged = batchUpdate();
Error in testing1 (line 28) [cr,ccr] = kmeans(R,10) the above error occurred while executing a program for kmeans clustering. kindly help me out.

댓글 수: 4

It is essentially impossible to diagnose this without seeing your code.
Can you provide the smallest possible code (and data) that will replicate this issue? Oftentimes, doing this may help you discover the problem yourself.
dpb
dpb 2014년 3월 10일
Not enough info...most likely it's a data input problem that doesn't have sufficient numbers to allow for 10 clusters or the data is so tightly grouped that many of the requested 10 are empty even if appears to be sufficient DOF overall.
That the message is "Empty cluster" on first iteration makes one or the other (or both) of the above likely imo...
Cut down the number of clusters requested altho would likely do well to use scatter or some other visual tools to visualize the data prior to just blindly asking kmeans to do its thing...
chethan
chethan 2014년 3월 18일
the problem was with the data supplied for kmeans clustering. thank u sir.
Look at the documentation page, at the 'emptyaction' option.

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

질문:

2014년 3월 10일

댓글:

2014년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by