using kmeans function in parallel

2 ビュー (過去 30 日間)
Jordi
Jordi 2013 年 5 月 15 日
コメント済み: Marwan Radwan 2016 年 10 月 2 日
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 日
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 日
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
  1 件のコメント
Abeera Tariq
Abeera Tariq 2014 年 11 月 11 日
Hi, do u have knowledge of matlabmpi?

サインインしてコメントする。


Jordi
Jordi 2013 年 5 月 16 日
Thanks a lot !
Jordi

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by