منطق غيمي الجلسة الثامنة

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Generalized Modus Ponins

if x is A, then y is B
x is A
-----------------------then y is B
y is B needs to be inferred from the premise A
B
How do we define B ?
max min composition
B = max {min(A, A B)}

Note: if there are multiple premises, they are


connected by and

Example
:Given universe

U = {1, 2, 3}
V = {4, 5, 6, 7}

Given fuzzy sets

A = u is 2 = {0.8, 1, 0.8}
B = v is 4 = {1, 0.8, 0.3, 0}

Given Godel implication

1
2
3

A B = 1 if A B, else B

Given A

First we calculate
AB=

u is 3 = {0.3, 0.8, 1}

1 1 0.3 0
1 0.8 0.3 0
1 1 0.3 0

Then:
B(4) = max {0.3, 0.8, 1}
B(5) = max {0.3, 0.8, 1}
B(6) = max {0.3, 0.3, 0.3}
B(7) = max {0, 0, 0}
B = {1, 1, 0.3, 0}

B = {1, 1, 0.3, 0}
this result is a fuzzy set,
and not a definite crisp
answer
a defuzzified answer can
be found in various ways
a popular way is to find
the centre of mass
:thus we can say
if u = 2 then v =4
u = 3
------------------------------
then v = 5.42

there exists other


methods to defuzzifiy
fuzzy sets

Building Systems: An
Example
:The Basic Tipping Problem
Given a number between 0 and 10 that
represents the quality of service at a restaurant
, (where 10 is excellent)
and another number between 0 and 10 that
represents the quality of the food at that
, restaurant (again, 10 is excellent)
?what should the tip be
7

The rules
If the service is poor or the food is rancid, then. 1
.tip is cheap
.If the service is good, then tip is average. 2
If the service is excellent or the food is. 3
delicious, then tip is
.generous
:Assume that
,an average tip is 15%
a generous tip is 25%, and
8 . a cheap tip is 5%

:Four Steps
Step
Step
Step
Step

1.
2.
3.
4.

Fuzzify inputs (fuzzification)


Rule evaluation
Aggregation of rule outputs
Defuzzify

Step 1: Fuzzify Inputs


Take crisp inputs and determine the
degree to which they belong to each of
the
appropriate
fuzzy
sets
(via
.membership functions)

10

Thus the food is delicious to the degree 0.7

Step 2: Rule Evaluation


Process of mapping one or more
input(s) to a single number that
represents
the
result
of
the
evaluation.This number is then
applied to the output membership
.function

11

Step 3: Aggregate All


Outputs
Aggregation is the process by which
. the outputs of all rules are unified
The membership functions that
represent the outputs of each rule
.are combined into a single fuzzy set

12

Aggregate All Outputs


(Cont)

13

Step 4: Defuzzify
The final output of the fuzzy system
must be
:a crisp number. For this process
The input aggregate output from
step 3
The output a single number
14

Defuzzification (Cont)

15

User Interface Layout: Getting


Started

16

User Interface Layout: FIS


Editor

17

UI Layout: MF Editor - Service

18

UI Layout: MF Editor Food

19

UI Layout: MF Editor - Tip

20

User Interface Layout: Rule


Editor

21

User Interface Layout: Rule


Viewer

22

User Interface Layout: Surface


Viewer

23

You might also like