Hi, I want to use kmeans function in parallel, with a matlabpool of workers. When I open a matlabpool and then execute kmeans with Useparallel = true, only 1 core is working. The default numbers of workers is 4. What is wrong? Should I put the execution of the kmeans function inside a spmd block? Thanks in advance,
Jordi

댓글 수: 1

Marwan Radwan
Marwan Radwan 2016년 10월 2일
please i need this code and steps how to set useparallel i am new in matlab thank you alot

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

 채택된 답변

Shashank Prasanna
Shashank Prasanna 2013년 5월 15일

1 개 추천

Hi Jordi, when the 'useparallel' flag set to true, KMEANS only computes the replicates in parallel.
If you have your replicates set to 1 you are unlikely to see a performance difference.
Try setting a larger 'replicates' to compare the performance difference.
Replicates are used to run kmeans several times with different start point so as to have a better chance of finding a global minimum and better centroids.

추가 답변 (2개)

Thomas
Thomas 2013년 5월 15일

0 개 추천

Don't know if this would help but you can find an implementation of k-means in MATLAB using MATLABmpi (message passing interface) http://www.cs.toronto.edu/~dross/code/parallel.shtml
Jordi
Jordi 2013년 5월 16일

0 개 추천

Thanks a lot !
Jordi

카테고리

도움말 센터File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

질문:

2013년 5월 15일

댓글:

2016년 10월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by