How to see the firing strength using command line of a fuzzy System?

조회 수: 3 (최근 30일)
Luis M
Luis M 2012년 2월 28일
답변: Sam Chak 2024년 9월 21일
Hi, I have built a fuzzy system from scratch using the fuzzy logic toolbox. My FIS has a huge number of rules and I would like to see, after using the comand evalfis for a concrete example, which is the firing strength of each rule. The problems is that I can not figure out how to access to this information using command line.
Thak you for your help

답변 (1개)

Sam Chak
Sam Chak 2024년 9월 21일
The firing strengths can be obtained from the 5th output argument of the 'evalfis' command. Howevern note that this approach doesn't work when the fis is a fistree object.
fis = readfis('tipper')
fis =
mamfis with properties: Name: "tipper" AndMethod: "min" OrMethod: "max" ImplicationMethod: "min" AggregationMethod: "max" DefuzzificationMethod: "centroid" DisableStructuralChecks: 0 Inputs: [1x2 fisvar] Outputs: [1x1 fisvar] Rules: [1x3 fisrule] See 'getTunableSettings' method for parameter optimization.
Service_Val = 2;
Food_Val = 1;
[output, fuzzifiedIn, ruleOut, aggregatedOut, ruleFiring] = evalfis(fis, [Service_Val Food_Val]);
disp(fuzzifiedIn)
0.4111 1.0000 0.1353 1.0000 0.0000 0
disp(ruleFiring)
1.0000 0.1353 0.0000
Alternative:
The firing strengths can be also be determined by manually performing the fuzzy operations on the fuzzified input values.
% Rule 1 firing strength
max(fuzzifiedIn(1,:))
ans = 1
% Rule 2 firing strength
min(fuzzifiedIn(2,:))
ans = 0.1353
% Rule 3 firing strength
max(fuzzifiedIn(3,:))
ans = 6.6584e-07
plotrule(fis, Inputs=[Service_Val Food_Val])

카테고리

Help CenterFile Exchange에서 Fuzzy Inference System Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by