How to create Fuzzy Membership Functions from data using fcm()

6 ビュー (過去 30 日間)
Pat
Pat 2014 年 5 月 3 日
回答済み: Sam Chak 2025 年 4 月 17 日
I have an image.
i think they have generated the clustered data using fcm, i have used in-built fcm command, but can you tell how to find the values as listed in table 1 .i.e fuzzy data set
please tell
how to convert data into a fuzzy data set, using one of the standard membership functions (the triangular and trapezoid membership functions)

回答 (1 件)

Sam Chak
Sam Chak 2025 年 4 月 17 日
Hi @Pat
The road traffic data in Table 1 are, in fact, incomplete. From our perspective, we cannot use the incomplete data to produce the fuzzy data set shown in Table 4.
In the example below, instead of using the fcm() command, you can directly use the genfis() function to generate the FIS from the input-output data using the FCM clustering method specified in genfisOptions().
%% The McDonald's Logo
x = linspace(-6.5, 6.5, 2601)';
y = 6*abs(x) - x.^2 + 3.25;
figure
plot(x, y, 'linewidth', 3, 'color', '#265EF5'), grid on, ylim([-1 13])
axis equal
xlabel('x'), ylabel('y')
title('McDonald''s Logo')
%% Generate FIS based on Fuzzy C-Means Clustering method
opt = genfisOptions('FCMClustering', 'FISType', 'mamdani');
opt.NumClusters = 4;
opt.MaxNumIteration = 200;
opt.DistanceMetric = "fmle";
opt.Verbose = 0;
fis = genfis(x, y, opt);
figure
plotmf(fis, 'input', 1, 101), grid on,
xlabel('x'), title('Input fuzzy sets')

カテゴリ

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