How to assess Rule Impact on Output MF Coverage and Prediction Accuracy in Fuzzy Systems
12 views (last 30 days)
Show older comments
Is there any way we can see the rule coverage and accuracy of prediction related to each rule in Fuzzy Logic toolbox? Also is there any way we can prune the rules to reach into the minimum number of rules and also shorten the antecedent of rules as much as possible (compact rules)?
0 Comments
Answers (1)
Sam Chak
on 18 Apr 2025
Hi @Saleh
The R2024b new plotrule() function allows the user to see the firing strength and influence of each rule over the coverage of the output MF across the output universe of discourse. However, individual fuzzy rules do not predict the output of the fuzzy system. Instead, the implication of each rule results in a truncated output fuzzy set, and all these truncated output fuzzy sets are combined, using the maximum operator, into a single larger fuzzy output set that encompasses a range of output values.
This combined fuzzy output set must be defuzzified to obtain a single, clear output value. To determine the overall accuracy of the output values predicted by the fuzzy system, it is necessary to compare them with the output values from another data set. The example below uses the R2024b new plotfiserr() function to display the tip error distribution for the Sugeno Tipper in relation to the output data set from the Mamdani Tipper.
Unfortunately, there is no AI-like smart level function to prune the rules to achieve the 'absolute' minimum number of rules and to reduce the number of antecedent MFs as much as possible. If training data is available, the closest function would likely be the subclust() function, which uses the subtractive clustering algorithm to estimate the number of clusters in the training data, thereby substantially reducing the number of rules and MFs.
%% Load Mamdani Tipper
mam_fis = readfis('tipper');
figure
plotrule(mam_fis, input=[2, 9])
%% Transform Mamdani Tipper into Sugeno Tipper
sug_fis = convertToSugeno(mam_fis);
figure
plotrule(sug_fis, input=[2, 9])
%% Plot tip error for Sugeno Tipper compared to the tip data set from Mamdani Tipper
figure
pts = 1000; % number of points
xin = 10*rand(pts, 2);
tip = evalfis(mam_fis, xin);
plotfiserr(sug_fis, xin, tip), axis equal
title('Sugeno tip error distribution w.r.t. Mamdani Tipper')
0 Comments
See Also
Categories
Find more on Fuzzy Inference System Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

