Fuzzy Relations Example Example 3.7. A Certain Type of Virus Attacks Cells of The Human Body. The Infected Cells Can Be

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

FUZZY RELATIONS EXAMPLE

Example 3.7. A certain type of virus attacks cells of the human body. The infected cells can be
visualized using a special microscope. The microscope generates digital images that medical
doctors can analyze and identify the infected cells. The virus causes the infected cells to have a
black spot, within a darker grey region (Fig. 3.6).

A digital image process can be applied to the image. This processing generates two variables:
the first variable, P, is related to black spot quantity (black pixels), and the second variable, S, is
related to the shape of the black spot, i.e., if they are circular or elliptic. In these images it is
often difficult to actually count the number of black pixels, or to identify a perfect circular
cluster of pixels; hence, both these variables must be estimated in a linguistic way.

Figure 3.6 An infected cell shows black spots with different shapes in a micrograph.

Suppose that we have two fuzzy sets, P which represents the number of black pixels (e.g.,
none with black pixels, C1, a few with black pixels, C2, and a lot of black pixels, C3), and S which
represents the shape of the black pixel clusters, e.g., S1 is an ellipse and S2 is a circle. So we have

P ≡ {( C1 , 0.1 ) , ( C 2 ,0.5 ) , ( C 3 ,1.0 ) }= { 0.1/C1 +0.5 /C 2+ 1.0/C3 }

P= [ 0.1 0.5 1.0 ]


C 1 C2 C 3

S ≡{( S 1 , 0.3 ) ,( S 2 , 0.8) }={ 0.3/ S1 +0.8/ S2 }

S= [ 0.3 0.8 ]
S 1 S2

and we want to find the relationship between quantity of black pixels in the virus and the shape
of the black pixel clusters. Using a Cartesian product between P and S gives

R=P × S={( C1 , 0.1 ) , ( C 2 ,0.5 ) , ( C 3 ,1.0 ) } ×{( S 1 , 0.3 ) ,( S 2 , 0.8) }


R=P × S={( C1 , S 1 , 0.1 ∧0.3 ) , ( C 1 , S 2 ,0.1 ∧0.8 ) ,
( C 2 , S1 , 0.5∧ 0.3 ) , ( C2 , S 2 , 0.5 ∧0.8 ) ,
( C 3 , S1 , 1.0∧ 0.3 ) , ( C3 , S 2 , 1.0 ∧0.8 )

R=P × S={( C1 , S 1 , 0.1 ) , ( C1 , S 2 , 0.1 ) ,


( C 2 , S1 , 0.3 ) , ( C2 , S 2 , 0.5 ) ,
( C 3 , S1 , 0.3 ) , ( C3 , S 2 , 0.8 )

or

R=P × S={ 0.1 /C 1+ 0.5/C2 +1.0 /C 3 } × { 0.3 /S1 +0.8 /S 2 }

R=P × S={0.1∧ 0.3/(C ¿ ¿ 1, S1 )+ 0.1∧ 0.8/(C ¿ ¿ 1 , S2 )+ ¿ ¿ ¿


0.5 ∧0.3 /(C ¿ ¿2 , S 1)+ 0.5∧ 0.8/(C ¿ ¿ 2 , S2 )+¿ ¿ ¿
1.0 ∧0.3 /(C ¿ ¿ 3 , S 1)+1.0 ∧ 0.8/(C ¿ ¿ 3 , S2 )}¿ ¿

R=P × S={0.1/(C ¿ ¿1 , S 1)+0.1 /(C ¿ ¿ 1 , S 2)+¿ ¿ ¿


0.3 /(C ¿ ¿ 2 , S 1)+0.5 /(C ¿ ¿ 2 , S 2)+¿ ¿ ¿
0.3 /(C ¿ ¿ 3 , S 1)+ 0.8/(C ¿ ¿ 3 , S2 )}¿ ¿

S S
C1 1 2
R=P × S=C 2 0.1 0.1
C3 [ ]
0.3 0.5
0.3 0.8

Now, suppose another microscope image is taken and the number of black pixels is slightly
different; let the new black pixel quantity be represented by a fuzzy set, P' :

P' ≡ {( C 1 , 0.4 ) , ( C2 , 0.7 ) ,(C 3 , 1.0)}= { 0.4 /C 1+ 0.7/C 2+1.0 /C3 }

P' =[ 0.4 0.7 1.0 ]


C 1 C2 C 3

Using max–min composition with the relation R will yield a new value for the fuzzy set of pixel
cluster shapes that are associated with the new black pixel quantity:

S S
C1 1 2
S' =P' ∘ R= [ 0.4 0.7 1.0 ] ∘ C 2 0.1 0.1
C 1 C 2 C3
C3
0.3 0.5
0.3 0.8[ ]
S' =[ ∨{0.4 ∧ 0.1, 0.7 ∧0.3 , 1.0 ∧0.3 } ∨{0.4 ∧0.1 , 0.7 ∧0.5 , 1.0 ∧0.8 }]
S 1 S2

S' =[ ∨{0.1 , 0.3 ,0.3 } ∨{0.1 ,0.5 , 0.8 }]


S 1 S2

S' =[ 0.3 0.8 ]


S1 S2

or

S' ={ ( S 1 ,0.3 ) , (S 2 , 0.8) }={ 0.3/ S1 +0.8 /S2 }

FUZZY MODELS EXAMPLES

1. Suponga la siguiente base de conocimiento de un sistema difuso singleton de 2 entradas y 2


salidas con razonamiento de Mamdani (smamt1fls223.fis):

R1: IF x1 is F11 and x2 is F12 THEN y1 is G11, y2 is G12


R2: IF x1 is F21 and x2 is F22 THEN y1 is G21, y2 is G22
R3: IF x1 is F31 and x2 is F32 THEN y1 is G31, y2 is G32

donde x 1 ∈[0.6 , 314], x 2 ∈[576.2 ,1801.8], y 1 ∈[−176.7 , 1784.3] y y 2 ∈[0 , 1774]. Las
particiones de las variables de entrada y salida se definen como: T(x 1) = {F11:gaussmf,
[30.74, 36.72], F21: gaussmf,[53.30, 239.83], F31: gaussmf,[46.56, 141.11]}. T(x 2) = {F12:
gaussmf, [339.29, 1256.10], F22: gaussmf,[249.28, 1443.33], F32: gaussmf,[318.85,
1059.96]}. T(y1) = {G11: gaussmf,[57.94, 1.86], G21: gaussmf,[88.57, 1479.81], G31:
gaussmf,[75.80, 658.40]}. T(y2) = {G12: gaussmf,[81.04, 216.74], G22: gaussmf,[68.12,
1190.00], G32: gaussmf,[76.72, 1370.38]}. ¿Cual es el valor de y '1 y y '2, cuando x '1=120 y
x '2=1420 ?. Utilizar los siguientes métodos de defuzificación:

a) Centroid b) Center-of-Sums c) Height d) Modified Height e) Center of


Sets

Escriba el procedimiento de cálculo de todos sus resultados.


2. Use la base de conocimiento del problema 1 como un sistema difuso non-singleton de 2
entradas y 2 salidas con razonamiento de Mamdani (nsmamt1fls223.fis) para evaluar los
valores de y '1 y y '2, cuando las entradas son non-singleton (entradas difusas), definidas por
los siguientes conjuntos difusos: X1 : 'gaussmf',[5, 120] y X2 : 'gaussmf',[20, 1420]. Utilizar
los mismos métodos de defuzificación del problema 1.

Escriba el procedimiento de cálculo de todos sus resultados.

3. Suponga la siguiente base de conocimiento de un sistema difuso singleton con


razonamiento de Takagi-Sugeno-Kang (TSK) de primer orden (stskt1fls223.fis):

R1: IF x1 is F11 and x2 is F12 THEN y1 is g11(x), y2 is g12(x)


R2: IF x1 is F21 and x2 is F22 THEN y1 is g21(x), y2 is g22(x)
R3: IF x1 is F21 and x2 is F32 THEN y1 is g31(x), y2 is g32(x)

donde x 1 ∈[0.6 , 314], x 2 ∈[576.2 ,1801.8], y 1 ∈[−176.7 , 1784.3] y y 2 ∈[0 , 1774]. Las
particiones de las variables de entrada y salida se definen como: T(x 1) = {F11:gaussmf,
[99.72, 180.00], F21: gaussmf,[99.72, 34.30], F31: gaussmf,[99.72, 255.00]}. T(x 2) = {F12:
gaussmf, [389.98, 1107.30], F22: gaussmf,[389.98, 1226.20], F32: gaussmf,[389.98,
1690.50]}. T(y1) = {g11(x):linear,[3.7949,0.0933,125.4302], g21(x):linear,[5.6947,-0.0942,
-100.5123], g31(x):linear, [5.1021,-0.6430,1298.9170]}. T(y 2) = {g12(x):linear,[-
11.2851,0.1212,3747.8226], g22(x):linear, [0.5746,0.2836,-1247.8982], g32(x):linear,[-
4.0849, -2.7732, 6783.3121]}. ¿Cual es el valor de y '1 y y '2, cuando x '1=120 y x '2=1420 ?.
Utilizar el método de defuzificación del promedio ponderado.

Las funciones lineales, gk , j ( x ' ), se denotan con el formato, gk , j ( x ' ):linear ,[c kj ,1 , c kj ,2 , c k,j 0 ];
x '1
donde gk , j ( x ' ) =c j
k ,1
'
x +c
1
j
k,2
'
x +c
2
j
k ,0
[]
'
yx=
x '2
.

Escriba el procedimiento de cálculo de todos sus resultados.

4. Use la base de conocimiento del problema 3 como un sistema difuso non-singleton de 2


entradas y 2 salidas con razonamiento de Mamdani (nstskt1fls223.fis) para evaluar los
valores de y '1 y y '2, cuando las entradas son non-singleton (entradas difusas), definidas por
los siguientes conjuntos difusos: X1 : 'gaussmf',[5, 120] y X2 : 'gaussmf',[20, 1420]. Utilice el
mismo método de defuzificación del problema 3.

Escriba el procedimiento de cálculo de todos sus resultados.

5. Suponga la siguiente base de conocimiento de un sistema difuso singleton de 2 entradas y 2


salidas con razonamiento de Tsukamoto (stsut1fls223.fis):

R1: IF x1 is F11 and x2 is F12 THEN y1 is G11, y2 is G12


R2: IF x1 is F21 and x2 is F22 THEN y1 is G21, y2 is G22
R3: IF x1 is F31 and x2 is F32 THEN y1 is G31, y2 is G32

donde x 1 ∈[0.6 , 314], x 2 ∈[576.2 ,1801.8], y 1 ∈[−176.7 , 1784.3] y y 2 ∈[0 , 1774]. Las
particiones de las variables de entrada y salida se definen como: T(x 1) = {F11:gaussmf,
[30.74, 36.72], F21: gaussmf,[53.30, 239.83], F31: gaussmf,[46.56, 141.11]}. T(x 2) = {F12:
gaussmf, [339.29, 1256.10], F22: gaussmf,[249.28, 1443.33], F32: gaussmf,[318.85,
1059.96]}. T(y1) = {G11: gaussmf,[57.94, 1.86], G21: gaussmf,[88.57, 1479.81], G31:
gaussmf,[75.80, 658.40]}. T(y2) = {G12: gaussmf,[81.04, 216.74], G22: gaussmf,[68.12,
1190.00], G32: gaussmf,[76.72, 1370.38]}. ¿Cual es el valor de y '1 y y '2, cuando x '1=120 y
x '2=1420 ?.

Escriba el procedimiento de cálculo de todos sus resultados.

6. Use la base de conocimiento del problema 5 como un sistema difuso non-singleton de 2


entradas y 2 salidas con razonamiento de Tsukamoto (nstsut1fls223.fis) para evaluar los
valores de y '1 y y '2, cuando las entradas son non-singleton (entradas difusas), definidas por
los siguientes conjuntos difusos: X1 : 'gaussmf',[5, 120] y X2 : 'gaussmf',[20, 1420].

Escriba el procedimiento de cálculo de todos sus resultados.

You might also like