Download presentation
Presentation is loading. Please wait.
Published byMaud Richard Modified over 9 years ago
1
Fuzzy Expert Systems
2
2 Motivation On vagueness “Everything is vague to a degree you do not realise until you have tried to make it precise.” Bertrand Russell
3
3 The world is imprecise. Mathematical and Statistical techniques often unsatisfactory. Experts make decisions with imprecise data in an uncertain world. They work with knowledge that is rarely defined mathematically or algorithmically but uses vague terminology with words. Fuzzy logic is able to use vagueness to achieve a precise answer. By considering shades of grey and all factors simultaneously, you get a better answer, one that is more suited to the situation.
4
4 Outline “ So far as the laws of mathematics refer to reality, they are not certain. And so far as they are certain, they do not refer to reality." - Albert Einstein Introduction (Fuzzy Logic) Fuzzy Sets & Rules Fuzzy Expert Systems
5
5 Introduction - Fuzzy Logic Fuzzy logic is a superset of boolean logic It was created by Dr. Lotfi Zadeh in 1960s for the purpose of modeling the uncertainty inherent in natural language In fuzzy logic, it is possible to have partial truth values
6
6 Fuzzy Logic Unlike two-valued Boolean logic, fuzzy logic is multivalued. It deals with degrees of membership and degrees of truth.
7
7 Fuzzy Logic – cont’d Fuzzy logic is based on the idea that all things admit of degrees Temperature – “It is very cold” Height – “He is very tall guy” Speed –... Beauty –...
8
8 Fuzzy Sets & Rules A fuzzy set is a set with fuzzy boundaries. In classical set theory; f A (x):X {0,1}, where f A (x) = In fuzzy sets; A (x):X {0,1}, where A (x) = 1, if x is totally in A; A (x) = 0, if x is not in A; 0 < A (x) < 1, if x is partly in A 1, if xA 0, if xA
9
9 Fuzzy Sets & Rules – cont’d A (x) is the “membership function”. Value of this function is between 0 and 1. This value represents the “degree of membership” (membership value) of element x in set A.
10
10 Fuzzy Sets & Rules – cont’d Classical tall men example.
11
11 Fuzzy Sets & Rules – cont’d Crisp and fuzzy sets of tall men
12
12 Fuzzy Sets Membership functions representing three fuzzy sets for the variable "height".
13
13 Fuzzy Sets... Representing crisp and fuzzy sets as subsets of a domain (universe) U".
14
14 Fuzzy Sets... Support of a fuzzy set A
15
15 I-cut of a fuzzy set Fuzzy Sets...
16
16 Notation For the member, x, of a discrete set with membership µ we use the notation µ/x. In other words, x is a member of the set to degree µ. Discrete sets are written as: A = µ 1 /x 1 + µ 2 /x 2 +.......... + µ n /x n Or where x 1, x 2....x n are members of the set A and µ 1, µ 2,...., µ n are their degrees of membership. A continuous fuzzy set A is written as:
17
17 Fuzzy Sets - Example “numbers close to 1”
18
18 Fuzzy Sets The members of a fuzzy set are members to some degree, known as a membership grade or degree of membership. The membership grade is the degree of belonging to the fuzzy set. The larger the number (in [0,1]) the more the degree of belonging. (N.B. This is not a probability) The translation from x to µA(x) is known as fuzzification. A fuzzy set is either continuous or discrete. Graphical representation of membership functions is very useful.
19
19 Fuzzy Sets - Example Again, notice the overlapping of the sets reflecting the real world more accurately than if we were using a traditional approach.
20
20 Imprecision Words are used to capture imprecise notions, loose concepts or perceptions.
21
21 Operations with fuzzy sets Five operations with two fuzzy sets A and B approximately represented in a graphical form
22
22 Operations with fuzzy sets... Showing graphically one way to measuring similarity and distance between fuzzy sets A and B. The black area represents quantitatively the measure.
23
23 Union & Intersection of Fuzzy Sets: T-norms and T-conorms Building blocks of fuzzy systems Only a few used in real applications Introduced to enable generalisation from boolean to multi-valued logic How do we use them? Most commonly used t-norm for fuzzy intersection is to take the minimum Most commonly used t-conorm for fuzzy union is to take the maximum. t-norms define a general class of intersection operators for fuzzy sets t-conorms define a general class of aggregation operators for union of fuzzy sets
24
24 Fuzziness versus probability Probability density function for throwing a dice and the membership functions of the concepts "Small" number, "Medium", "Big".
25
25 Developing a FS Determining the Membership Function ‘heuristic’ approach where the developer sits down with an expert Statistical techniques Neural networks and genetic algorithms have also been used Determining the Rules type of rules that should be used content of the rules Composition operators (i.e. combining rules) Defuzzification (i.e. getting a crisp output).
26
26 Example - Dinner for two Rule 2If service is good, then tip is average Rule 3If service is excellent or food is delicious, then tip is generous The inputs are crisp (non- fuzzy) numbers limited to a specific range All rules are evaluated in parallel using fuzzy reasoning The results of the rules are combined and distilled (de-fuzzyfied) The result is a crisp (non- fuzzy) number Output Tip (5-25%) Dinner for two: this is a 2 input, 1 output, 3 rule system Input 1 Service (0-10) Input 2 Food (0-10) Rule 1If service is poor or food is rancid, then tip is cheap
27
27 Dinner for two 1. Fuzzify the input: 2. Apply Fuzzy operator
28
28 Dinner for two 3. Apply implication method
29
29 Dinner for two 4. Aggrega te all outputs
30
30 Dinner for two 5. defuzzify Various approaches e.g. centre of area mean of max
31
31 Graphical Overview (generalised)
32
32 Mamdani Procedure (overview) For given values of x and y (using min for AND and max or OR): Or max for an ‘or’ i.e. aggregate all the truncated sets
33
33 Conceptualising in fuzzy terms Standard membership functions: single-valued, or singleton triangular trapezoidal S-function (sigmoid function): S(u) = 0, u<=a S(u) = 2((u-a)/(c-a))2, a <u <= b S(u) = 1 - 2((u-a)/(c -a))2, b <u <= c S(u) = 1, u > c.
34
34 Conceptualising in fuzzy terms... more standard membership functions... Z function: Z(u)= 1 - S(u) Pi - function: P(u)=S(u), u b. Two parameters must be defined for the quantization procedure: the number of the fuzzy labels; the form of the membership functions for each of the fuzzy labels.
35
35 Conceptualising in fuzzy terms... Standard types of membership functions: Z function; n function; S function; trapezoidal function; triangular function; singleton.
36
36 Conceptualising in fuzzy terms... One representation for the fuzzy number "about 600".
37
37 Conceptualising in fuzzy terms... Representing truthfulness (certainty) of events as fuzzy sets over the [0,1] domain.
38
38 Fuzzy relations and fuzzy implications... (a) Membership functions for fuzzy sets for the Smoker and the Risk of Cancer case example. (b) The Rc implication relation: "heavy smoker > high risk of cancer" in a matrix form.
39
39 Fuzzy Sets & Rules – cont’d Fuzzy rules. A fuzzy rule can be defined as a conditional statement as below. IF x is A THEN y is B
40
40 Fuzzy Sets & Rules – cont’d Differences between classical and fuzzy rules. IF height is > 1.80 THEN select_for_team In fuzzy rules; IF height is tall THEN select_for_team
41
41 Fuzzy Sets & Rules – cont’d A fuzzy rule can have multiple antecedents. IF height is tall AND age is small THEN select_for_team Or, another example IF service is excellent OR food is delicious THEN tip is generous
42
42 Fuzzy systems A Fuzzy system consists of: Fuzzy input and output variables Fuzzy rules Fuzzy inference
43
43 Fuzzy rules Rule 1: IF (CScore is high) and (CRatio is good) and (CCredit is good) then (Decision is approve) Rule 2: IF (CScore is low) and (CRatio is bad) or (CCredit is bad) then (Decision is disapprove)
44
44 Fuzzy inference methods Inputs to a fuzzy system can be: fuzzy, e.g. (Score = Moderate), defined by membership functions; exact, e.g.: (Score = 190); (Theta = 35), defined by crisp values Outputs from a fuzzy system can be: - fuzzy, i.e. a whole membership function. - exact, i.e. a single value is produced.
45
45 Fuzzy Expert Systems A “fuzzy expert system” is an expert system that uses a collection of fuzzy membership functions and rules, to reason about data. Fuzzy logic is primarily used as the underlying logic of Fuzzy Expert systems
46
46 Fuzzy Expert Systems – cont’d Fuzzy logic is used to define rules of inference, and membership functions that allow a expert system to draw conclusions The rules in a fuzzy expert system are usually of a form similar to the following: if x is low and y is high then z = medium
47
47 Fuzzy Expert Systems – cont’d How is Fuzzy Logic used? Define the control objectives and criteria Determine the input and output relationships Use the rule-based structure of FL, break the control problem down into a series of IF X AND Y THEN Z rules
48
48 Fuzzy Expert Systems – cont’d How is Fuzzy Logic used? Create FL membership functions that define the meaning (values) of Input/Output terms used in the rules. Create the necessary rules. Test the system, evaluate the results, tune the rules and membership functions, and retest until satisfactory results are obtained.
49
49 Fuzzy Expert Systems – cont’d Experts rely on common sense when they solve problems. Fuzzy logic reflects how people think. It attempts to model our decision making, and our common sense. Leads to new, more human, intelligent systems.
50
50 Fuzzy Expert Systems – cont’d Fuzzy rules of inference are used to form what is commonly referred to as a “knowledge base” which acts as a repository of information from which an expert system can make decisions.
51
51 Fuzzy Expert Systems – cont’d Inference process in fuzzy expert systems has four steps. FUZZIFICATION INFERENCE COMPOSITION DEFUZZIFICATION
52
52 Fuzzy Expert Systems – cont’d
53
53 Fuzzy Expert Systems – cont’d Fuzzification : In the fuzzification subprocess, the membership functions defined on the input variables are applied to their actual values, to determine the degree of truth for each rule premise. Inference : The truth value for the premise of each rule is computed, and applied to the conclusion part of each rule. This results in one fuzzy subset to be assigned to each output variable for each rule.
54
54 Fuzzy Expert Systems – cont’d Composition : All of the fuzzy subsets assigned to each output variable are combined together to form a single fuzzy subset for each output variable. Defuzzification : Sometimes it is useful to just examine the fuzzy subsets that are the result of the composition process, but more often, this fuzzy value needs to be converted to a single number - a crisp value. This is what the defuzzification subprocess does.
55
55 Fuzzy Expert Systems – cont’d
56
56 Fuzzy Expert Systems – cont’d Fuzzy expert systems can be used in: Pattern Recognition Financial Systems Operation Research Data Analysis
57
57 Fuzzy systems design Steps: identify the problem define the input and output variables define the set of fuzzy rules select the fuzzy inference method experiment and validate the system
58
58 Methods for defuzzification: center of gravity mean of maxima n see Figure 3.26 Methods of defuzzification: the centre of gravity method (COG), and the mean of maxima method (MOM) applied over the same membership function for a fuzzy output variable y. They calculate different crisp output values. Fuzzy Rules and Fuzzy Inference...
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.