Himpunan Fuzzy dan Operasi Dasar Anifuddin Azis
Dari Himpunan Klasik ke Himpunan Fuzzy Misal U adalah semesta pembicaraan yang berisi semua kemungkinan elemen yang terkait dengan konteks. Pada himpunan klasik (crisp) A, semesta pembicaraan U dapat didefinisikan dengan mendaftar semua anggotanya atau menyebutkan syarat yang harus dimiliki oleh anggota himpunan (metode aturan). Pada metode aturan himpunan A ditunjukkan oleh : Metode ketiga adalah metode keanggotaan, yaitu menggunakan fungsi keanggotaan nol-satu untuk A, ditulis dengan Himpunan A secara matematis ekuivalen dengan fungsi keanggotaannya , yaitu mengetahui sama dengan mengetahui himpunan A itu sendiri
Himpunan Fuzzy (Fuzzy Set) Sebuah himpunan fuzzy dalam semesta U disifatkan dengan sebuah fungsi keanggotaan µA(x) yang memiliki nilai dalam selang [0,1]. Dengan kata lain, fungsi keanggotaan himpunan klasik hanya bernilai nol dan satu, sedangkan pada himpunan fuzzy adalah fungsi kontinyu pada selang [0,1]. Sebuah himpunan fuzzy A dalam semesta U dapat direpresentasikan sebagai himpunan berpasangan antara anggota A dengan nilai keanggotaannya sbb : A = {(x, µA(x))| x Є U} where µA(x) is called the membership function for the fuzzy set A. U is referred to as the universe of discourse.
Untuk U kontinyu, himpunan A ditulis sebagai dengan tanda integral tidak menunjukkan integrasi, tetapi kumpulan semua titik x Є A dengan fungsi keanggotaan µA(x). Untuk U diskrit, A ditulis : Dengan tanda sigma bukan menunjukkan operasi penjumlahan tetapi kumpulan semua titik x Є A dengan fungsi keanggotaan µA(x).
Fuzzy sets with a discrete universe Himpunan fuzzy A dengan U diskrit, ditulis : Misal U= {0, 1, 2, 3, 4, 5, 6} himpunan jumlah anak yang mungkin dalam suatu keluarga Himpunan Fuzzy A dengan “jumlah anak yang pas” dapat dituliskan sbb :
Fuzzy sets with a continuous universe X = R+ be the set of possible ages for human beings. fuzzy set A = “about 50 years old” may be expressed as Dengan µA(x) = 1/(1 + ((x-50)/10)4
Fuzzy Membership Functions One of the key issues in all fuzzy sets is how to determine fuzzy membership functions The membership function fully defines the fuzzy set A membership function provides a measure of the degree of similarity of an element to a fuzzy set Membership functions can take any form, but there are some common examples that appear in real applications
Membership functions can either be chosen by the user arbitrarily, based on the user’s experience (MF chosen by two users could be different depending upon their experiences, perspectives, etc.) Or be designed using machine learning methods (e.g., artificial neural networks, genetic algorithms, etc.) There are different shapes of membership functions; triangular, trapezoidal, piecewise-linear, Gaussian, bell-shaped, etc.
Fungsi Keanggotaan: Fungsi Linier 9
Fungsi Keanggotaan: Segitiga 10
Fungsi Keanggotaan: Trapesium 11
µA(x) c=5 s=2 m=2 x Gaussian membership function c: centre s: width m: fuzzification factor (e.g., m=2) µA(x) c=5 s=2 m=2 x
c=5 s=0.5 m=2 c=5 s=5 m=2
c=5 s=2 m=0.2 c=5 s=5 m=5
Konsep dasar Himpunan Fuzzy Konsep tentang support, fuzzy singleton, center, crossover point, height, normal fuzzy set, α-cut Support of a fuzzy set in U is a crisp set that contains all element of U that have nonzero membership values in A, that is, supp(A) = {(xєU | µA(x) > 0 } Fuzzy set whose support is a single point in U is called fuzzy singleton core(A) is set of all points x in X such that core(A) = {(xєU | µA(x) =1 }
The center of a fuzzy set : if the mean value of all points at which the membership function of the fuzzy set achieves its maximum value is finite, then define this mean value as the center of the fuzzy set; if the mean value equals positive (negative) infinite, then the center is defined as the smallest (largest) among all points that achieve the maximum membership value Crossover point of a fuzzy set A is the point in U such that µA(x) = 0.5 α-cut of a fuzzy set A is a crisp set that contains all element in U that have membership values in A greater than or equal to α Aα = {(xєU | µA(x) ≥ α }
Operasi Dasar Fuzzy Fuzzy logic begins by borrowing notions from crisp logic, just as fuzzy set theory borrows from crisp set theory. As in our extension of crisp set theory to fuzzy set theory, our extension of crisp logic to fuzzy logic is made by replacing membership functions of crisp logic with fuzzy membership functions [J.M. Mendel, Uncertain Rule-Based Fuzzy Logic Systems, 2001] In Fuzzy Logic, intersection, union and complement are defined in terms of their membership functions This section concentrates on providing enough of a theoretical base for you to be able to implement computer systems that use fuzzy logic Fuzzy intersection and union correspond to ‘AND’ and ‘OR’, respectively, in classic/crisp/Boolean logic These two operators will become important later as they are the building blocks for us to be able to compute with fuzzy if-then rules
Logical OR (U) Classic/Crisp/Boolean Logic Logical AND (∩) Truth Table A B A ∩ B 0 0 0 0 1 0 1 0 0 1 1 1 Truth Table A B A U B 0 0 0 0 1 1 1 0 1 1 1 1 A A B B Crisp Union Crisp Intersection
Definisi Operasi pada Himpunan Fuzzy Definisi Persamaan, contains, komplemen, union, intersection pada dua himpunan fuzzy A dan B adalah sbb : Himpunan A dan B dikatakan sama jika dan hanya jika µA(x) = µB(x) untuk semua xєA B contains A ditulis A B, jika dan hanya jika µA(x) ≤ µB(x) untuk semua xєA Komplemen A adalah himpunan fuzzy Ā pada U yang memililik fungsi keanggotaan : A union B dalah himpunan fuzzy pada U, ditulis A B, yang memiliki fungsi keanggotaan A intersection B dalah himpunan fuzzy pada U, ditulis A ∩ B , yang memiliki fungsi keanggotaan
Suppose we have the following (discrete) fuzzy sets: Example 1: Suppose we have the following (discrete) fuzzy sets: A = 0.4/1+0.6/2+0.7/3+0.8/4 B = 0.3/1+0.65/2+0.4/3+0.1/4 The union of the fuzzy sets A and B = 0.4/1+0.65/2+0.7/3+0.8/4 The intersection of the fuzzy sets A and B = 0.3/1+0.6/2+0.4/3+0.1/4 The complement of the fuzzy set A = 0.6/1+0.4/2+0.3/3+0.2/4
Example 1: (cont.) Let’s show the fuzzy sets A and B graphically
Example 2 (2003 exam question) Given two fuzzy sets A and B a. Represent A and B fuzzy sets graphically b. Calculate the of union of the set A and set B c. Calculate the intersection of the set A and set B d. Calculate the complement of the union of A and B
Example 2 (cont) a
Example 2 (cont) b c d
Example 3: Graphical representation of the Fuzzy operations (taken from J.M. Mendel, Uncertain Rule-Based Fuzzy Logic Systems, 2001) Consider the fuzzy sets A = damping ratio x considerably larger than 0.5, and B = damping ratio x approximately equal to 0.707. Note that damping ratio is a positive real number, i.e., its universe of discourse, X, is the positive real numbers Consequently, where, for example, µA(x) and µB(x) are specified, as:
Example 3: (cont.) Figure (a): µA(x), µB(x) Figure (b): µAUB(x) Figure (c): µA∩B(x) Figure (d): µB(x), µB(x)
Contoh AB [x] = min(A[x], B[x]) AB [x] = max(A[x], B[x]) Nilai keanggotaan sebagai hasil dari operasi 2 himpunan: fire strength atau a-predikat Misalkan nilai keanggotaan IP 3.2 pada himpunan IPtinggi adalah 0.7 dan nilai keanggotaan 8 semester pada himpunan LulusCepat adalah 0.8 maka a-predikat untuk IPtinggi dan LulusCepat: AND AB [x] = min(A[x], B[x]) IPtinggiLulusCepat = min(IPtinggi[3.2], LulusCepat[8]) = min(0.7,0.8) = 0.7 OR AB [x] = max(A[x], B[x]) a-predikat untuk IPtinggi atau LulusCepat: IPtinggiLulusCepat = max(IPtinggi[3.2], LulusCepat[8]) = max(0.7,0.8) = 0.8 NOT (Complement) A’[x] = 1 - A[x] a-predikat untuk BUKAN IPtinggi : IPtinggi‘ = 1 - IPtinggi[3.2] = 1 - 0.7 = 0.3 27