Published on

    please if you know any link or document help me pls....
    Are you sure you want to  Yes  No
    Your message goes here
  • my good friend thank you mycin
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. An Expert System MYCIN
  2. 2. Definition of Expert System <ul><li>A computing system capable of representing and reasoning about some knowledge rich domain, which usually requires a human expert, with a view toward solving problems and/or giving advice. Such systems are capable of explaining their reasoning. </li></ul><ul><li>Does not have a psychological model of how the expert thinks, but a model of the expert’s model of the domain. </li></ul>
  3. 3. What is: <ul><li>Expertise? </li></ul><ul><li>Expertise  consists of those characteristics, skills and knowledge of a person (that is, expert) or of a system, which distinguish experts from novices and less experienced people. </li></ul><ul><li>An expert? </li></ul><ul><li>often outperforming human beings at particular tasks are generally termed as expert. </li></ul>
  4. 4. Distinction Between an Expert System and a Knowledge-Based System <ul><li>To be classified as an ‘expert system’ the system must be able to explain the reasoning process. </li></ul><ul><li>This is often accomplished by displaying the rules that were applied to reach a conclusion. </li></ul>
  5. 5. Rule-Based Expert Systems: Suitable Domains <ul><li>Many Rules </li></ul><ul><li>No Unifying Theorem </li></ul><ul><li>Knowledge can be easily separated from the way it is used </li></ul><ul><li>Updating the knowledge base has to be easy </li></ul><ul><li>The knowledge base can be the only [indirect] communication channel among rules </li></ul><ul><li>Clinical/psychological and other domains, rather than mathematical/physical domains </li></ul>
  6. 6. MYCIN: The Problem <ul><li>Roberts & Visconti [1972]: </li></ul><ul><ul><li>Only 13% of patients are treated rationally </li></ul></ul><ul><ul><li>66% are being given irrational treatment </li></ul></ul><ul><ul><li>21% are being given questionable treatment </li></ul></ul><ul><li>Irrationality means, for example: </li></ul><ul><ul><li>Using a contra-indicated combination </li></ul></ul><ul><ul><li>Using the wrong agent for a specific organism </li></ul></ul><ul><ul><li>Not taking the required cultures </li></ul></ul>
  7. 7. Design Parameter <ul><li>Program must be competent & easy to use </li></ul><ul><li>Must handle a large, changing body of knowledge </li></ul><ul><li>Interact with human users </li></ul><ul><li>Must take time into account </li></ul><ul><li>Work with incomplete or uncertain information </li></ul>
  8. 8. System Components <ul><li>Consultation system </li></ul><ul><ul><li>Asks questions </li></ul></ul><ul><ul><li>Draws conclusions </li></ul></ul><ul><ul><li>Gives advice </li></ul></ul><ul><li>Explanation system </li></ul><ul><ul><li>Translates rule to English before display </li></ul></ul><ul><li>Rule acquisition/modification system </li></ul>
  9. 9. Expert System Structure User Interface Environment Language/Shell Explanation Facility Inference Engine Knowledge Base Blackboard
  10. 10. Stages in Diagnosis and Treatment <ul><li>Decide if there is a significant infection </li></ul><ul><li>Identify the causing organism(s) by clinical and laboratory evidence </li></ul><ul><li>Decide what antibiotic agent the organisms are sensitive to </li></ul><ul><li>Prescribe the optimal drug combination for the particular case </li></ul>
  11. 11. A MYCIN Runtime Example
  12. 12. The MYCIN Architecture Consultation program Explanation program Knowledge-acquisition program Dynamic patient data Static factual & judgmental knowledge Physician user Infectious diseases expert
  13. 13. A Sample Context Tree
  14. 14. Rule Grammar <ul><li><rules. ::= </li></ul><ul><li><premise> <action> </li></ul><ul><li><premise> ::= </li></ul><ul><li>($AND <condition> … <condition>) </li></ul><ul><li><condition> ::= </li></ul><ul><li>(<predicate> <context> <parameter> <value>) | </li></ul><ul><li>($OR <condition> … <condition>) </li></ul><ul><li><action> ::= </li></ul><ul><li><conclusion> | <instruction> </li></ul>
  15. 15. English Rule <ul><li>IF strain of org is gramneg and </li></ul><ul><li>morphology of org is rod and </li></ul><ul><li>aerobicity of org is aerobic </li></ul><ul><li>THEN </li></ul><ul><li>there is strongly suggestive evidence </li></ul><ul><li>(0.8) that the class of org is </li></ul><ul><li>enterobacteriacae </li></ul>
  16. 16. The Knowledge Base <ul><li>Inferential knowledge stored in decision rules </li></ul><ul><ul><li>If Premise then Action ( Certainty Factor [ CF ]) </li></ul></ul><ul><ul><li>If A&B then C (0.6) </li></ul></ul><ul><ul><li>The CF represents the inferential certainty </li></ul></ul><ul><li>Static knowledge : </li></ul><ul><ul><li>Natural language dictionary </li></ul></ul><ul><ul><li>Lists (e.g., Sterile Sites) </li></ul></ul><ul><ul><li>Tables (e.g., gram stain, morphology, aerobicity) </li></ul></ul><ul><li>Dynamic knowledge stored in the context tree </li></ul><ul><ul><li>Patient specific </li></ul></ul><ul><ul><li>Hierarchical structures: Patient, cultures, organisms </li></ul></ul><ul><ul><li>< Object , Attribute , Value > triples: <Org1, Identity, Strep> </li></ul></ul><ul><ul><li>A CF used for factual certainty <Org1, Identity, Staph, 0.6> </li></ul></ul>
  17. 17. Static Data Structures <ul><li>Simple lists </li></ul><ul><ul><li>enumerate organisms and sterile sites known to system </li></ul></ul><ul><li>Knowledge tables </li></ul><ul><ul><li>contain clinical parameters and their values under various circumstances </li></ul></ul><ul><li>Classification system </li></ul><ul><ul><li>clinical parameters according the contexts in which they apply </li></ul></ul>
  18. 18. Dynamic Data Structures <ul><li>Context tree </li></ul><ul><ul><li>serves to organize information relating to a particular patient </li></ul></ul><ul><ul><li>used to structure clinical problem and relate contexts to one another </li></ul></ul><ul><ul><li>rules are related to the context tree (although the rules themselves are not organized into either a decision tree or inference network) </li></ul></ul>
  19. 19. Control Structure <ul><li>Backward chaining </li></ul><ul><ul><li>helps to keep it focuses </li></ul></ul><ul><ul><li>facilitates backward reasoning from top level goal for all queries </li></ul></ul>
  20. 20. Inference Strategy <ul><li>Subgoals are generalized (i.e. match with variables) when possible </li></ul><ul><li>All applicable rules are evaluated before reaching a decision </li></ul><ul><li>Facts with certainities between –0.2 and +0.2 are treated as unknown </li></ul><ul><li>Mycin asks for lab for some facts before attempting a deduction </li></ul><ul><li>A list of rules that fail under the current context is maintained to avoid re-evaluation </li></ul><ul><li>Premises are evaluated based on known fact before search is allowed </li></ul>
  21. 21. Goal Rule <ul><li>IF </li></ul><ul><li>there is an org requiring therapy and </li></ul><ul><li>consideration has been given to possibilty of other orgs requiring therapy </li></ul><ul><li>THEN </li></ul><ul><li>compile a list of possible therapies and </li></ul><ul><li>select the best alternative from list </li></ul>
  22. 22. Consultation Procedure <ul><li>Create a patient context as the top level node in the context tree </li></ul><ul><li>Attempt to apply the goal rule to this particular patient context </li></ul><ul><li>Context tree is fleshed out in an effort to accumulate evidence from user query or inference </li></ul><ul><li>Each node contains accumulated evidence including “lab data” to allow alternation between question selection and rule invocation </li></ul>
  23. 23. Mutually Recursive Procedures <ul><li>Monitor </li></ul><ul><ul><li>attempts to evaluate premise of current rule </li></ul></ul><ul><ul><li>if it fails rule is discarded and next rule from list is examined (restricted by context) </li></ul></ul><ul><li>Findout </li></ul><ul><ul><li>gathers evidence for and against rule premise </li></ul></ul><ul><ul><li>if question can be asked control returns to Monitor with answer </li></ul></ul><ul><ul><li>if no question new list of rules to determine truth of rule premise is returned to Monitor </li></ul></ul>
  24. 24. Mycin Rules <ul><li>Had 200 rules in 1976 </li></ul><ul><li>Meta-rules </li></ul><ul><ul><li>rule pruners similar to alpha/beta cutoffs </li></ul></ul><ul><ul><li>rules to reorder relevant domain rules </li></ul></ul><ul><ul><li>general (domain free) problem solving heuristics </li></ul></ul><ul><ul><li>some forward (antecedent) reasoning to cut stupid questions (i.e. skip pregnancy questions for males) </li></ul></ul>
  25. 25. Explanation System <ul><li>Can display rule being invoked at any point in consultation </li></ul><ul><li>Record rule invocation and associates them with questions asked and rules invoked </li></ul><ul><li>Use rule index to retrieve particular rules in answer to questions </li></ul><ul><li>Why and how questions answered using goal tree </li></ul>
  26. 26. Rule Acquisition System <ul><li>Domain experts allowed to enter and change rules </li></ul><ul><li>Rules translated to Lisp and rule numbers added to “Look-ahead” and “Updated-by” lists </li></ul><ul><li>Does not catch contractions and inconsistencies in large rule-bases </li></ul>
  27. 27. Evaluation <ul><li>1974 </li></ul><ul><li>Panel of 5 experts approve 72% of Mycin’s recommendations for 15 patients </li></ul><ul><li>1976 </li></ul><ul><li>8 experts (5 faculty, 1 resident, 1 med student, 1 research fellow) made drug recommendations for 10 patients </li></ul><ul><li>Mycin had best match (52%) with actual drug recommendations used by attending physician </li></ul>
  28. 28. The Rule Interpreter <ul><li>Control structure: goal driven , backward chaining </li></ul><ul><li>Attempt to establish values of clinical parameters at the leaf nodes </li></ul><ul><li>The interpreter retrieves a list of rules whose conclusions bear on current goals, and tries to evaluate these rules </li></ul><ul><li>Questions are asked only when the rules fail to deduce the necessary information </li></ul><ul><li>If the user cannot supply the information, the rule is ignored </li></ul>
  29. 29. A MYCIN Reasoning Tree
  30. 30. <ul><li>The Main MYCIN Algorithm </li></ul><ul><li>Uses Monitor and FindOut to recursively invoke each rule when relevant </li></ul>
  31. 31. The Monitor Mechanism
  32. 32. The FindOut Mechanism
  33. 33. Certainty Factors <ul><li>Not a Bayesian probability measure, but rather a Certainty Factor ( CF ) with its update functions </li></ul><ul><li>A Conclude function uses </li></ul><ul><ul><li>The CF of the rule used for making the inference </li></ul></ul><ul><ul><li>The minimal CF of the premises (using the Tally function) </li></ul></ul><ul><ul><li>The context node about which the conclusion is made </li></ul></ul><ul><ul><li>The clinical parameter whose value is added to the dynamic DB </li></ul></ul><ul><ul><li>The value of the clinical parameter </li></ul></ul><ul><li>Conclude derives a conclusion including the CF of the result </li></ul><ul><ul><li>E.g., “ There is suggestive evidence (0.7) that the identity of the organism is streptococcus ” </li></ul></ul><ul><ul><li>The CF is mapped into English </li></ul></ul><ul><li>The CF of a context is updated by other evidence (relevant rules) </li></ul><ul><li>It is always true that -1 ≤ CF ≤ +1 </li></ul><ul><li>If CF = +1 then all other hypotheses are rejected </li></ul>
  34. 34. The Evaluation Method <ul><li>15 patients with positive blood cultures (at least one organism) </li></ul><ul><li>5 Stanford infectious disease experts </li></ul><ul><li>5 experts from other hospitals </li></ul><ul><li>All data recorded and given, if asked for, by the computer or a human expert </li></ul><ul><li>All decisions by the computer or the experts recorded, including the majority opinion </li></ul>
  35. 35. Summary <ul><li>Mycin combines the advantages of general rule-based system with the advantages of an “inexact” reasoning system </li></ul><ul><li>Mycin has not addressed </li></ul><ul><ul><li>how to convert from human terms to certainties </li></ul></ul><ul><ul><li>how to normalize across different people’s </li></ul></ul><ul><ul><li>how far to propagate certainty factor changes based on new evidence </li></ul></ul><ul><ul><li>how to provide feedback to database to improve certainty factor accuracy </li></ul></ul>
  36. 36. <ul><li>Thank You </li></ul>