KBS - test 1

Zadanie 1 (wydobywanie regul):

M   a1 - x1,x5
M   a0 - x2, x4
M   a2 - x3
------------------
b0 - x1, x2, x3, x4
M   b2 - x5
-----------------
M    c1 - x2
c2 - x1, x3, x4, x5
=========
d1 - x1, x3, x5
d2 - x2, x4
-------------------------------------------
M    a1 < d1  +       a1 -> d1
a0 < d1  -
M     a0 < d2  +      a0 ->  d2
M     a2 < d1  +      a2 -> d1
b0 < d1  -                                 ERID
b0 < d2  -
M      b2 < d1 +       b2 -> d1
M      c1 < d2  +    c1 -> d2
c2 < d1  -
c2 < d2  -
-------------------------------------------

b0*c2 - x1, x3,x4  < d1 -         LERS
b0*c2 < d2  -
--------------------------------------------------

b0*c2 -> d2    1/3
bo*c2 -> d1   2/3
c2 -> d1   3/4
c2 -> d2   1/4
b0 -> d1  2/4
b0 -> d2  2/4
------------------------------------------------------------

Zadanie 2 (dyskretyzacja):

A:  1  3   5   10
B:  3  5   8  10

p1 = 2, p2 = 4, p3 = 7, q1=4, q2 = 7, q3 = 9   ciecia

----------
                      f(x1,x2)=  p1 + q1 + q2 + q3
f(x1,x4) = q1 + q2
                      f(x1,x6) = p1 + p2 + q1 + q2 + q3
                      f(x2,x3) = p2 + q2 + q3
                      f(x2,x5) = p2 + p3 + q2 + q3
f(x2, x7) = q2 + q3
                       f(x3,x4) = p1 + p2 + q2
                      f(x3,x6) = q2 + q3
                      f(x4,x5) = p1 + p2 +p3 + q2
f(x4,x7) = p1 + q2
                     f(x5,x6) = p3 + q2 + q3
                     f(x6,x7) = p2 + q2 + q3
----------------------------------------------
F = (q1 + q2)(q2 + q3)(p1 + q2) = q2
CNF  -> DNF
--------------------------------------------------
[0 - 7), [7 - 16]  - B
[0 - 15]  - A

------------------

x1 , [0 - 15] , [0 , 7) ,  1
x2,  [0 - 15] , [7, 16] , 2

Wyszukiwanie regul w systemach z niepelna informacja:

[1] – 1, 4, 5   klasy tolerancji
[2] – 2, 6
[3] – 3
[4] – 4, 1, 5
[5] -  5, 1, 4, 8
[6] – 6, 2, 5

1 -  P* S               [Price = high]*[Size = full] ->good + excel
2 – P*A*(P+A) = P*A 
3 -  S*A   

a1*e2*f2 > a1*c2*(d2 + c2) = a1*c2  -   x3

c2 -> e2  (system S2)

d2 -> f2   c2 ->f2  

e2*f2 = c2

a1*e2*f2 = a1*c2  - x3

KBS – test 2

Problem 2:

(a,3)*(d,2)*(f,1) = (a,3)*(d,2)*[ a(3)*c(1) + a(2)*c(1) + a(1) + a2 +  ...]
                                                         1               ½              ½       1/3
  t  -> f(1)   t  trzeba znalezc.

a(3)*c(1) -> f1
a(2)*c(1) -> f(1)   ½
a(1) -> f1    1/2
a2 -> f1  1/3
a3 -> f1  1/2
c(1)  -> f1  2/3
c(2)  -> f1  ¼
d(1) ->   f1   1/2
d(2)  -> f1   2/5

Resultat:   y6   z wiara 1  otrzymujac pomoc z Tablicy 1.
                 {y5,y6,y7}  z wiara ½   otrzymujac pomoc z Tablicy 1.
{y5,y7} z wiara  ¼
{y5,y6,y7}  z wiara  2/5  
Przy naszej interpretacji  ( + znaczy max, * znaczy mnozenie) 
wynik bedzie:   
y6 – wiara 1
y5 –wiara  ½
y7 – wiara ½

LERS;
a(1) – x1, x3    
a(2) – x2, x4, x7
a(3) – x5, x6 
c(1) – x4, x6, x7
c(2) -  x1, x2, x3, x5 
d(1) –x1, x3
d(2) – x2, x4,x5,x6,x7 
f(1) – x1, x4, x6
f(2) – x3, x7
f(0) – x2,x5  
               a(1)*c(1) – 0       (markowany)
               a(1)*c(2) = a(1)
               a(1)*d(1) = a(1)
               a(1)*d(2) = 0
a(2)*c(1) –  x4, x7  
               a(2)*c(2)  - x2  <  f0     regula pewna:  a(2)*c(2)  -> f0     
                a(2)*d(1) - 0
                a(2)*d(2) = a(2)
                a(3)*c(1) – x6      regula pewna:  a(3)*c(1) -> f1
                a(3)*c(2) – x5     regula pewna:  a(3)*c(2) -> f0
                a(3)*d(1) - 0
                a(3)*d(2) = a(3)
                c(1)*d(1) - 0
                c(1)*d(2) – c(1)
                c(2)*d(1) = d(1)
                c(2)*d(2) – x2,x5   regula pewna: c(2)*d(2) -> f0 

                 a(2)*c(1)*d(1)   (sprawdzamy czy ktorys z podtermow niejest markowany (jesli tak to aktualny term jest markowany)
                  a(2)*c(1)*d(2)
szukamy regul mozliwych:

a(2)*c(1) -> f(1)   ½
a(2)*c(1) -> f(2)   ½
a(1) -> f1    1/2
a(1) -> f2    1/2
a2 -> f1  1/3
a2 -> f2  1/3
a(2) –> f0  1/3
a(3) -> f0  ½
a3 -> f1  1/2
c(1)  -> f1  2/3
c1 –>  f2  1/3
c(2)  -> f1  ¼
c2 -> f0  1/2
c2 –> f2  1/4
d(1)  f1   1/2
d1 -> f2   1/2
d(2)  -> f1   2/5
d2  ->  f0   2/5
d2 ->  f2   1/5

KBS-test 3

Problem 1.

c1 – y4,y6   
c2 – y1,y2,y3,y5,y7
              d1- y1,y3,y4  <  y*g1      d1 ->  y*g1   pewna
d2 – y2,y5,y6,y7  

y * g1 – y1, y3, y4
m * g0 –  y2, y5
m * g1 – y6
o * g1 – y7  

             c1*d2 -  y6  <   m * g1     c1*d2 ->  m * g1     pewna

c2*d2 -  y2,y5,y7

c2*d2 -> m * g0    2/3
c2*d2 -> o * g1      1/3
c1 -> m * g1   1/2
c2
d2 -> m * g1     ¼

m*(d,2)*(g1).  = d2 * [c1*d2 + c1 + d2]  =
                                        1         ½     1/4

x4, x6, x7  - wiara 1
x2, x5  -  wiara 1/4

------------------------------------------

Problem 2:

a3 * c1 -> d2
a3 * e1 -> d2
a1 *c2 -> d1
a1*e1 -> d1
a1*c3 ->  d2
a3*c3 -> d1

e1 * a3         ->  d2
        a1 * c2  -> d1

regule akcji:  [a3 -> a1] -> [d2 -> d1]
rozszerzona regule akcji:  [a3 -> a1] * [c = c2] -> [d2 -> d1]

a1*c3 ->  d2
a3*c3 ->  d1

regula akcji:  [a1 -> a3]  -> [d2 -> d1]
rozszerzona regule akcji:  [a1 -> a3]  -> [d2 -> d1] 

a(x1) = Null   (zakladamy)

x1 wspomaga  r1, r2, r4, r5, r6.

d2 – 1/3 * 1/31 * 3 + 1/3*1* 3 + 1/3*1*4 = 8/3
d1 – 1/3*1*2 + 1/3*1/3*2 = 8/9

d2/d1 < 4