フィルターのクリア

How to view all U matrix for each iteration in Fuzzy c means clustering ?

1 回表示 (過去 30 日間)
SWAMI NATHAN
SWAMI NATHAN 2015 年 7 月 3 日
コメント済み: SWAMI NATHAN 2015 年 8 月 28 日
How to view all U matrix for each iteration in Fuzzy c means clustering ?

採用された回答

Walter Roberson
Walter Roberson 2015 年 8 月 28 日
Loop around from 1 to the number of iterations you want. The default for fcm() is 100; if you wanted to match that, then you would loop to 100. Call the loop control variable L
In each loop, you would set the random number generator seed to the same value. Then call fcm() passing in your data, then the number of clusters, and then the vector [2, L, 1e-5, 1] which will be your options vector. The second element of the options vector is the number of loop iterations that fcm is to do, so each time you will be telling fcm to do one more iteration than the time you ran it before. Record or otherwise process the U result.
For example:
randseed = 54321;
numcluster = 5;
maxiter = 100;
U = cell(maxiter, 1);
for L = 1 : maxiter
rng(randseed); %must be reset to the same value each time
[~, U{L}, ~] = fcm(YourData, numcluster, [2, L, 1e-5, 1]);
end
Now U{1} will be the U after the first iteration, U{2} will be the U after the second iteration, and so on.
  1 件のコメント
SWAMI NATHAN
SWAMI NATHAN 2015 年 8 月 28 日
Thank your very much for your kind reply sir. I need your support forever.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by