Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
How to view all U matrix for each iteration in Fuzzy c means clustering ?

Réponse acceptée

Walter Roberson
Walter Roberson le 28 Août 2015
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 commentaire
SWAMI NATHAN
SWAMI NATHAN le 28 Août 2015
Thank your very much for your kind reply sir. I need your support forever.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Fuzzy Logic Toolbox dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by