1 / 49

Chap 4: Fuzzy Expert Systems Part 2

Chap 4: Fuzzy Expert Systems Part 2. SCCS451 Artificial Intelligence Week 10. Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath Pupacdi. The formal systematic study of the principles of valid inference and correct reasoning. Unclear. Fuzzy Logic.

gen
Download Presentation

Chap 4: Fuzzy Expert Systems Part 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chap 4: Fuzzy Expert SystemsPart 2 SCCS451 Artificial Intelligence Week 10 Asst. Prof. Dr. SukanyaPongsuparb Dr. SrisupaPalakvangsa Na Ayudhya Dr. BenjarathPupacdi

  2. The formal systematic study of the principles of valid inference and correct reasoning Unclear Fuzzy Logic a form of multi-valued logic derived from fuzzy set theory to deal with reasoning that is approximate rather than precise. (Wikipedia) a theoretical system used in mathematics, computing and philosophy to deal with statements which are neither true nor false (dictionary.cambridge.org)

  3. Classical (Crisp) Set • fA(x) called the characteristic function of A • Principle of Dichotomy: a classic set theory imposes a sharp boundary fA(x): X  {0, 1}, where

  4. Fuzzy Set 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. A(x) : membership function of set A membership value (0<= degree <=1): shows the degree of membership Basic idea: an element belongs to a fuzzy set with a certain degree of membership fuzzy set is a set with fuzzy boundaries

  5. Linguistic Variables <antecedent> THEN <consequent> IF object object value value Linguistic value Linguistic variable • Examples: • IF wind is strong THEN sailing is good • IF speed is slow THENstopping_distance is short • IFproject_duration is long • THENcompletion_risk is high * linguistic variable == fuzzy variable

  6. Hedges hedges Andy quite likes Thai food Mary looks very much like her mother Jim has been to several attractions in Thailand Hedges: terms that modify the shape of fuzzy sets e.g. very, somewhat, quite, more or less, and slightly

  7. Representation of hedges in fuzzy logic Concentration dilation dilation intensification

  8. Operations of fuzzy sets The classical set theory developed in the late 19th century by Georg Cantor describes how crisp sets can interact. These interactions are called operations: - Complement - Containment - Intersection - Union

  9. Operations of fuzzy sets

  10. Set Properties • The properties of set used in crisp sets can also be used in fuzzy sets • Frequently used properties:- • Commutativity • Associatively • Distributivity • Idempotency • Identity • Involution • Transitivity • De Morgan’s Laws

  11. How can we combine “fuzziness”to our rules ???

  12. Fuzzy Rules Classical IF-THEN rule Rule 1: IF speed is > 100 THEN stopping distance is long Rule 2: IF speed is < 70 THEN stopping distance is short • Fuzzy IF-THEN rule Rule 1: IF speed is fast THEN stopping distance is long Rule 2: IF speed is slow THEN stopping distance is short Fuzzy Rules: If the antecedent is true to some degree of membership, then the consequent is also true to that same degree.

  13. How to reason? These fuzzy sets provide the basis for a weight estimation model. The model is based on a relationship between a man’s height and his weight: IF height is tall THEN weight is heavy

  14. How to reason? (cont.) • The value of the output or a truth membership grade of the rule consequent can be estimated directly from a corresponding truth membership grade in the antecedent. This form of fuzzy inference uses a method called monotonic selection.

  15. How about multiple antecedents?

  16. Multiple Antecedents • Examples IF project_duration is long AND project_staffing is large AND project_funding is inadequate THEN risk is high IF service is excellent OR food is delicious THEN tip is generous

  17. Multiple Consequences • Example IF temperature is hot THEN hot_water is reduced; cold_water is increased

  18. Fuzzy Inference • Fuzzy inference: a process of mapping from a given input to an output, using the theory of fuzzy sets • Examples of inference techniques • Mamdani-Style Inference • Sugeno-Style Inference

  19. Mamdani-Style Inference • Linguistic variables and linguistic values must be identified Rule 1: IFproject_funding is adequate ORproject_staffing is small THEN risk is low Rule 2: IFproject_funding is marginal ANDproject_staffing is large THEN risk is normal Rule 3: IFproject_funding is inadequate THEN risk is high Rule 1: IF x is A3 OR y is B1 THEN z is C1 Rule 2: IF x is A2 AND y is B2 THEN z is C2 Rule 3: IF x is A1 THEN z is C3

  20. Mamdani-Style Inference (cont.) • There are four steps • Fuzzification • Rule Evaluation • Aggregation of the Rule Outputs • Defuzzification

  21. Mamdani-Style Inference (cont.) • Fuzzification • Take crisp inputs • Determine the degree of inputs

  22. Mamdani-Style Inference (cont.) 2) Rule Evaluation • Take fuzzified inputs • Apply them to the antecedents of the fuzzy rules AB(x) = min [A(x), B(x)], where xX • AB(x) = max [A(x), B(x)] , where xX Rule 1: IF x is A3 (0.0) OR y is B1 (0.1) THEN z is C1 C1(z) = max [A3(x), B1(y)] = max[0.0, 0.1] = 0.1 Rule 2: IF x is A2 (0.2) AND y is B2 (0.7) THEN z is C2 C2(z) = min[A2(x), B2(y)] = min[0.2, 0.7] = 0.2

  23. Mamdani-Style Inference (cont.)

  24. Mamdani-Style Inference (cont.) • The result of the antecedent evaluation can be applied to the membership function of the consequent. – functions can be clipped or scaled

  25. Mamdani-Style Inference (cont.) • Correlation Minimum (clipping): cut the consequent membership function at the level of the antecedent truth • Correlation Product (scaling): multiplying all membership degrees of the rule consequent by the rule antecedent

  26. Mamdani-Style Inference (cont.) 3) Aggregation of the rule outputs • Combine all outputs into a single fuzzy set

  27. Mamdani-Style Inference (cont.) 4) Defuzzification • Centroid technique (or centre of gravity – COG): find the point where a vertical line would slice the aggregate set into two equal masses

  28. Mamdani-Style Inference (cont.) 4) Defuzzification (cont.) • A reasonable estimate can be obtained by calculating it over a sample of points.

  29. Mamdani-Style Inference (cont.)

  30. Fuzzy Inference • Examples of inference techniques • Mamdani-Style Inference • Sugeno-Style Inference

  31. Sugeno-Style Inference • uses a single spike (singleton) as the member function of the rule consequent • Singleton: a fuzzy set with a membership function that is unity at a single particular point on the universe of discourse and zero everywhere else • Format of rules:- IFx is A ANDy is B THENz is f(x,y) where x, y and z are linguistic variables; A and B fuzzy sets on universe of discourses X and Y respectively; f(x,y) a mathematical function

  32. Sugeno-Style Inference (cont.) • Four steps of Sugeno • Fuzzification -> similar to Mamdani Style • Rule Evaluation IFx is A ANDy is B THENz is k the output is constant which makes all outputs to be spikes • Aggregation of the Rule Outputs -> similar to Mamdani Style

  33. Sugeno-Style Inference (cont.)

  34. Sugeno-Style Inference (cont.) 4. Defuzzification: use weighted average (WA)

  35. Mamdani VS Sugeno Mamdani • Capture expert knowledge • Express knowledge in more human-like manner • Not computationally efficient • Sugeno • Computationally effective • Work well with optimisation and adaptive techniques • Suitable for control problems and dynamic nonlinear systems

  36. Building Fuzzy Expert Systems 1. Specify the problem and define linguistic variables. 2. Determine fuzzy sets. 3. Elicit and construct fuzzy rules. 4. Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system. 5. Evaluate and tune the system.

  37. Building Fuzzy Expert Systems (cont.) • Case study • A service centre keeps spare parts and repairs failed ones. • A customer brings a failed item and receives a spare of the same type • Failed parts are repaired, placed on the shelf, and thus become spares. • The objective here is to advise a manager of the service centre on certain decision policies to keep the customers satisfied

  38. Building Fuzzy Expert Systems (cont.) • Specify the problem and define linguistic variables • average waiting time (mean delay) m • repair utilisation factor of the service centre  • number of servers s • initial number of spare parts n

  39. Building Fuzzy Expert Systems (cont.)

  40. Building Fuzzy Expert Systems (cont.) 2) Determine Fuzzy Sets • fuzzy sets can have a variety of shapes • a triangle or a trapezoid are widely used due to the simplification of the computational process • Key point – to maintain sufficient overlap in adjacent fuzzy sets for the fuzzy system to respond smoothly

  41. Building Fuzzy Expert Systems (cont.)

  42. Building Fuzzy Expert Systems (cont.) 3) Elicit and construct fuzzy rules • Knowledge acquisition such as • Ask experts • Books • Flow diagrams • Observation • Rule construction

  43. Building Fuzzy Expert Systems (cont.)

  44. Building Fuzzy Expert Systems (cont.)

  45. Building Fuzzy Expert Systems (cont.)

  46. Building Fuzzy Expert Systems (cont.) 4) Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system. • Possible methods • DIY by using programming languages e.g. C, C++ • fuzzy logic development tool such as MATLAB Fuzzy Logic Toolbox or Fuzzy Knowledge Builder

  47. Building Fuzzy Expert Systems (cont.) 5) Evaluate and tune the system • To check if the system meets the requirements • Use tools to analyse the system performance

  48. Building Fuzzy Expert Systems (cont.) • Tuning systems • Review model input and output variables e.g. redefine their ranges • Review the fuzzy sets e.g. define additional sets on the universe of discourse • Provide sufficient overlap between neighbouring sets • Review the existing rules e.g. modify rules, rewrite hedge rules • Adjust the rule execution weights • Revise shapes of the fuzzy sets.

  49. Applications of Fuzzy Logic • Air Conditioning • Digital Image Processing e.g. edge detection • Automobile and other vehicle subsystems, such as automatic transmissions, ABS and cruise control (e.g. Tokyo monorail) • Home appliances e.g. rice cookers, washing machines, dish washers

More Related