필터 지우기
필터 지우기

Error in kmeans of Matlab R2013 ?

조회 수: 1 (최근 30일)
Vincent Moron
Vincent Moron 2013년 5월 3일
댓글: Veera 2013년 9월 27일
Hello
I have an unexpected error by running kmeans in the last version of matlab 2013. I tried to cluster a data matrix having 12410 rows and 15 columns (it is actually Principal Component). There are no missing entries in the dataset. When I type >> k=kmeans(PC,2);
I have the following error
Error using randsample (line 106) REPLACE must be either true or false.
Error in kmeans/loopBody (line 357) C = X(randsample(S,n,k),:);
Error in internal.stats.parallel.smartForReduce (line 128) reduce = loopbody(iter, S);
Error in kmeans (line 295) ClusterBest = internal.stats.parallel.smartForReduce(...
I precise that I had not this error on previous version with exactly the same coding
Thanks in advance for any help and suggestion
Vincent

채택된 답변

Ilya
Ilya 2013년 5월 3일
Type
which kmeans
which randsample
to verify that you are using the functions from the official MATLAB installation. If you are, try to reproduce the problem on a smaller set of data and post that set here.
  댓글 수: 2
Vincent Moron
Vincent Moron 2013년 5월 3일
You were right. I had an old version of randsample stored in my personal directory and it mixes with the new one.
Thanks for the quick reply
Vincent
Veera
Veera 2013년 9월 27일
My matlab is using latest kmeans and randsample. There is no problem on small dataset and my data is output of PCA. I am facing this issue on larger dataset. Size of the dataset is around 250,000 vectors (250,000 * 188).

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by