Term-Paper (Cse 402) Artificial Intelligence
Term-Paper (Cse 402) Artificial Intelligence
Term-Paper (Cse 402) Artificial Intelligence
TOPIC: MYCIN
SUBMITTED BY: AJAY KR.PANDEY B-TECH (CSE) SEC. RK2904 REG-10902615 ROLL NO:RK2904A31
ACKNOWLEDGEMENT
I am Ajay Kumar pursuing B-Tech (CSE) from Lovely Professional University situated at phagwara, jalandhar Punjab. I will give special thanks to my Teacher Mr. CHANDRA PRAKASH SIR who has given me opportunity to work on such an interesting topic. I have enjoyed each moment of my life while preparing this term paper. I would like to pay special thanks to all my friends who inspire to put such an extra ordinary effort for making this term paper.
CONTENT: 1. 2. 3. 4. 5. 6. 7. INTRODUCTION HOW DOES MYCIN WORK WHAT DOES IT DO CERTAINITY FACTOR FOR MYCIN PROBABILITY PROBLEM DOMAIN REFERENCE
INTRODUCTION
MYCIN was an early expert system developed over five or six years in the early 1970s at Stanford University. It was written in Lisp as the doctoral dissertation of Edward Shortliffe under the direction of Bruce Buchanan, Stanley N. Cohen and others. This expert system was designed to diagnose and recommend treatment for certain blood infections. It was also used to identify bacteria causing severe infections, such as bacteremia and meningitis, and to recommend antibiotics, with the dosage adjusted for patient's body weight the name derived from the antibiotics themselves, as many antibiotics have the suffix "-mycin". To do the diagnosis properly involves growing cultures of the infecting organism. Unfortunately this takes around 48 hours, and if doctors waited until this was complete their patient might be dead! So, doctors have to come up with quick guesses about likely problems from the available data, and use these guesses to provide a covering treatment where drugs are given which should deal with any possible problem.
Definition
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.
PRACTICAL USE
MYCIN was never actually used in practice. This wasn't because of any weakness in its performance. As mentioned, in tests it outperformed members of the Stanford medical school faculty. Some observers raised ethical and legal issues related to the use of computers in medicine if a program gives the wrong diagnosis or recommends the wrong therapy, who should be held responsible? However, the greatest problem, and the reason that MYCIN was not used in routine practice, was the state of technologies for system integration, especially at the time it was developed. MYCIN was a stand-alone system that required a user to enter all relevant information about a patient by typing in response to questions that MYCIN would pose. The program ran on a large time-shared system, available over the early Internet, before personal computers were developed. In the modern era, such a system would be integrated with medical record systems, would extract answers to questions from patient databases, and would be much less dependent on physician entry of information. In the 1970s, a session with MYCIN could easily consume 30 minutes or morean unrealistic time commitment for a busy clinician.
Expert Systems Case Studies: MYCIN Problem domain: Selection of antibiotics for patients with serious infections. Medical decision making, particularly in clinical medicine is regarded as an"art form" rather than a "scientific discipline": this knowledge must be systemized for practical day-to-day use and for teaching and learning clinical medicine. Target Users: Physicians and possibly medical students and paramedics. Originators Edward Shortliffe, (1972) Department of Medicine and Computer Science, Heuristic Programming Project, Stanford University School of Medicine,
MYCIN -- A typical consultation 1. Patients name: (first - last) FRED BRAUN (Questions 1-3 request background patient data). 2. Sex: M 3. Age: 55 4. Are there any cultures for Fred Braun which may be related to the present illness, and from which organisms have been grown successfully in the microbiology laboratory? Y - - - CULTURE - 1 - - 5. From what site was the specimen for CULTURE - 1 taken? BLOOD = BLOOD
(System corrects typing error). 6. Please give the date and time when CULTURE-1 was obtained. (mo/da/yr time) JUN 20, 1977 The first organism isolated from the blood culture of 20-JUN-77 (CULTURE-1) will be referred to as: - - - ORGANISM - 1 - - 7. Enter the laboratory - reported identity of ORGANISM-1: UNKNOWN
INFECTION-1 is BACTEREMIA <ITEM-1> E.COLI [ORGANISM-1] <ITEM-2> KLEBSIELLA [ORGANISM-1] <ITEM-3> ENTEROBACTER [ORGANISM-1] <ITEM-4> KLEBSIELLA-PNEUMONIAE [ORGANISM-1}
Representing MYCIN Rules and Facts ORGRULES IF 1) the stain of the organism is gramneg, and 2) the morphology of the organism is rod, and 3) the aerobicity of the organism is aerobic
THEN there is strongly suggestive evidence (0.8) that the class of organism is enterobacteriaceae THERAPY RULES IF THEN The identity of the organism is bacteroides I recommend therapy chosen from the following drugs: 1. clindamycin (0.99) 2. chloramphenicol (0.99) 3. erthromycin (0.57) 4. tetracycline (0.28) 5. carbenicillin (0.27)
META RULES Rules encapsulating knowledge about knowledge -- which rules to apply in order to satisfy a certain (sub-) goal IF 1) the infection is pelvic abscess, and 2) there are rules which mention in their premise enterobacteriaceae, and 3) the there are rules which mention in their premise gram-positive rods
THEN there is suggestive evidence (0.4) that the former should be applied before the later
Representing MYCIN Rules and Facts MYCIN rule and fact descriptions are a formal language and have a formal syntactic description: formal syntax being essential to the definition of well-behaved inference
procedure. MYCIN rules can be expressed inBackus-Naur form (BNF). BNF is a form of context free grammar used extensively to define programming languages. In the notation keywords are written in uppercase (e.g. IF, THEN, AND, OR etc) and are regarded as terminals in the (BNF) syntax. Nonterminals are enclosed in angle brackets: <> the nonterminal figure to the left of ::= can be replaced with the expressions on the right. Rule description <rule> ::= <IF (premise THEN <action> [ELSE <action>]) OR <rule> ::= <premise> <action> | <premise> <action> <else>
The premise (also known in the literature as the antecedent) of a rule consists of a conjunction of conditions, each of which must hold for the the indicated action to be taken: <premise> ::= ($AND <condition> ... <condition>)
An action can lead either to a conclusion (e.g. consequent); or can lead to the invocation of an action function (e.g. procedure); or can lead to the execution of a number of conclusions or action functions: <action> ::= (<conclusion>) | (<actfunc>) | (DO ALL <conclusion> .....<conclusion>) | (DO ALL <actfunc>....<actfunc>) ::= (<consequent>) .... <conclusion>| (<procedure> ....<procedure>)
or <action>
A condition may be (i) a disjunction of conditions or a predicate and its associative triple (object-attribute-value), or (ii) more generally a special function and its argument and (iii ) negations of the conditions are handled by individual predicates <condition> ::= ($OR <condition> ... <condition>) | ( <special-func> <arguments>) | (<func1> <context> <parameter>) | ( <func2> <context> <parameter> <value>)
<else>
::= <concpart> <concpart> ::= <conclusion> | <act func> | (DO-ALL <conclusion> ... <conclusion>) | (DO-ALL <actfunc> ... <actfunc>)
MYCIN Parameters PROP-OP Those clinical parameters which are attributes of operative procedures (e.g., the cavity, if any, opened during the procedure) PROP-ORG Those clinical parameters which are attributes of organisms (e.g., identity, gram stain, morphology) PROP-PT Those clinical parameters which are attributes of the patient (e.g., name, sex, age, allergies, diagnoses) PROP-THER Those clinical parameters which are attributes of therapies being considered for recommendation (e.g., recommended dosage, prescribing name) EXPECT This property indicates the range of expected values that the parameter may have. IF equal to (YN), then the parameter is a yes-no parameter. IF equal to (NUMB), then the expected value of the parameter is a number IF equal to (ONE-OF <list>), then the value of the parameter must be a member of <list>. IF equal to (ANY), then there is no restriction on the range of values that the parameter may have PROMPT This property is a sentence used by MYCIN when it requests the value of the clinical parameter from the user; if there is an asterisk in the phrase, it is replaced by the name of the context about which the question is being asked; this property is used only for yes-no or single-valued parameters PROMPT1 This property is similar to PROMPT but is used if the clinical parameter is a multi-valued parameter; in these cases MYCIN only asks the question about a single
one of the possible parameter values; the value of interest is substituted for (VALU) in the question LABDATA This property is a flag, which is either T or NIL; if T it indicates that the clinical parameter is a piece of primitive data, the value of which may be known with certainty to the user. LOOKAHEAD This property is a list of all rules in the system that reference the clinical parameter in the premise
How MYCIN works 1. Create patient 'context' tree 2. Is there an organism that requires therapy? 3. Decide which drugs are potentially useful and select the best drug The above is a goal-oriented backward chaining approach to rule invocation & question selection. MYCIN accomplishes the invocation and the selection through two procedures: MONITOR and FINDOUT --procedures developed by the MYCIN development team
Certainty Factors: MYCIN and Inexact Reasoning Background: Clinical Practice: In medical diagnosis and treatment there is often uncertainty regarding attributes such as
the significance the disease the efficacy of a treatment the diagnosis itself. Medical Terminology: Medical (and other life and human sciences) terminology allows considerable scope for vagueness, ambiguity, inexactness,imprecision and/or uncertainty: "adequate" dosage of a drug "stable" condition of patient 'the patient is "feverish"' 'this is a "possible" case of meningitis Terminology, Knowledge and Knowledge Engineering: The knowledge of a subject domain is encoded in its terminology. Knowledge in an expert system is used for solving problems: a knowledge engineer is expected to engineer, or decode, this knowledge and use data structures to represent the results of the decoding process on a computer system. And, if this knowledge contains descriptions which are vague, ambiguous,inexact or reflects uncertainty, then it is essential to model the vagueness such that the description can be engineered on a computer system.
Medical Decision Making and Statistical Theories: Bayes' Theorem: A number of workers in medical sciences have used a variety of statistical methods and techniques for examining and utilizing evidence (e.g. clinical signs, patient history etc.) to select a diagnosis or to support a prescription. Bayes' Theorem has been used extensively in computer-based medical decision support systems. The medical diagnostic problem can be viewed as the assignment of probabilities to specific diagnosis after all the relevant data has been analyzed: Let e = sum of the relevant data di = ith diagnosis of a disease
then P(di y e) = the conditional probability that the patient has disease "i" in the light of evidence e P(e y di) = is the probability that a patient will have a complex of symptoms and signs represented by "e" given that he or she has disease "i" P(di) = a priori probability that the patient has disease "i", before any evidence has been gathered Bayes' Theorem allows P(di y e) to be calculated from the component conditional probabilities: P(di y e) = P(e y di) * P(di) / ??P(e y di) * P(di)
Probability, Confirmation and Modelling 'Belief' Consider the following rule IF 1) The stain of the organism in grampos, and (01) 2) The morphology of the organism is COCCUS, and (02) 3) The growth confirmation of the organisms chains (03) THEN There is suggestive evidence (0.7) that the identity of the organism is streptococus. (h1)
The antecedent clause (ie. the IF clause) can only be proved true if each of the 3 observations ( 01, 02 and 03) are proved to be true, then and only then it is possible to confirm the hypothesis ( h1) that the identify if the organism is streptococcuss with a 70% "belief" in that hypothesis ( h1)! P(h1 01&02 &03) = 0.7 During MYCIN'S knowledge acquisition sessions the knowledge engineers not only extracted the rules of the above type but also asked the experts to "weight the belief in a given conclusion" The P-function should not be (or could not be ) treated as probability by MYCIN's developers,: the number 0.7 is not probability: Because if the evidence for Streptococcuss is P(h1 01&02 &03) = 0.7 then logically it can be concluded that evidence against Streptococcuss is P( not h1 01&02 &03)= 0.3 The expert's concern here is that although evidence may support a hypothesis with degree X (e.g. 0.7), it does not support the negation of the hypothesis with degree 1X (e.g. 0.3)
Theory
(referring to what is likely to turn out to be true in the future) Classical Theory There are integers 'm' and 'n' such that P=m/n, where 'n' is the number of exhaustive and exclusive alternatives must occur and 'm' of these alternatives constitute the occurrence
of the observation 'o'. Propensity Theory Probability propositions 'make claims' about a propensity or 'would-be' or tendency in things. If an atom is said to have a probability of 0.9 of dis-integrating within the next minute , a statement has been made about its propensity to do so. Propositions about probability are propositions about proportions or relative frequencies as observed in the past: provides the basis for statistical data collection used by most of the Bayesian diagnostic programs
Frequency Theory
Statistical Probability Theories for verifying/confirming beliefs Subjective Theory Statements of probability regarding an event are propositions regarding people's actual belief in the occurrence (present or future) of the event in question. (REF: Ramsey 1931, de Finetti 1972 and Savage 1974) Probability is a logical relation between statements of evidence and hypothesis: Probability is the degree of confirmation of a hypothesis 'h' with respect to an evidence statement 'e'; for example an observational report. (REF: Keynes 1962, Carnap 1950)
Logical Theory
Logical Theory of Probability & Confirmation and Uncertainty The concept confirmation (of a hypothesis h) can be used in three possible ways: classificatory: comparative: 'the evidence e confirms the hypothesis h' 'e1 confirms h more strongly than e2 confirms h' or 'e confirms h1 more strongly than e confirms h2' 'e confirms h with strength x '
quantitative
The developers of MYCIN specified a semi quantitative approach. The degree of confirmation is of hypothesis h (given evidence e) is written as C[h,e]. A form which roughly parallels P[h e] .
Evidential Strength Model and Certainty According to the subjective probability theory: Expert's personal probability, P(h), reflects his/her belief in h at any given time therefore, 1 - P(h) can be viewed as an estimate of the expert's disbelief regarding the truth of h. Measure of Belief: If P[h e] is greater than P(h), the observation of 'e' increases the expert's belief in 'h' while decreasing disbelief in h. Proportionate decrease in disbelief ( alternatively, the measure of belief increment) due to the observation 'e' is P(h e) - P(h) MB[h , e]= -------------------------1 - P(h) Measure of Disbelief: If P[h y e] is less than P(h), the observation of 'e' decreases the expert's belief in 'h' while increasing disbelief in h. Proportionate decrease in belief ( alternatively, the measure of disbelief increment) due to observation 'e' is: P(h ) - P(h e) MD[h , e]= -------------------------P(h) Belief and disbelief correspond to the intuitive concepts of confirmation and disconfirmation Because a given piece of evidence cannot support both belief and disbelief, therefore if if MB[h , e] > 0 then MD[h , e] = 0; MD[h , e] > 0 then MB[h , e] = 0
(evidence is independent of hypothesis) Certainity Factors Certainity factors are based on a number of observations. First, in traditional probability theory the sum of confidence for a relationship and confidence against a relationship must add upto UNITY. However, it is often the case that an expert might have confidence, say X, that some relationship is true and have no feeling about the relationship being not true. Second, confidence measures correspond to the ibformal evaluations that human experts attach to their conclusions, e.g. 'it is probably true', or 'it is highly likely'. The certainity factors used in MYCIN and CENTAUR is based on some simplifying assumptions for (a) creating confidence measures and (b) for combining these confidences. These assumptions involve splitting 'conficdence for' from 'confidence against' a relationship as expressed through the so-called measure of belief (MB (H|E) ) and the measure of disbelief (MD(H|E)). These two measures constrain each other in that a given piece of evidence is either for or against a particular hypothesis. CF[h , e] = MB[h , e] - MD[h , e]
MYCIN's Certainty Factors: Certainty Factors: The value of every clinical parameter is stored by MYCIN along with an associated certainty factor (CF) that reflects MYCIN's "belief" that the value is correct. A CF is a number between -1 and +1 that reflects the degree of belief in a hypothesis: CF[h , e] = MB[h , e] - MD[h , e] Range of degrees of the Belief Measures
Combining functions: Given that di is the ith possible diagnosis, and sk is the kth clinical observation and e is the composite of all observed. Suppose that MB[di,sk] is known for each of sk, MB[di,sk] is known for each of sk, and e represents the conjunction of all the sk. Then MYCIN attempts to calculate CF[di,e] from the MB's and MD's known for individual sk's: MYCIN uses four combination functions: Incremental, Conjunction, Disjunction and Strength (of evidence) functions Incrementally acquired evidence 0: if MD[h,s1 & s2]= 1 MB[h,s1 & s2] = { MB[h,s1] + MB[h,s2] (1-MB[h,s1]) 0: if MB[h,s1 & s2]= 1 MD[h,s1 & s2] = {MD[h,s1] + MD[h,s2] (1- MD[h,s1]) Conjunction of hypotheses MB[h1 &h2,e] =min( MB[h1 , e] , MB[h2 , e]) MD[h1 &h2,e] =max( MD[h1 , e] , MD[h2 , e]) Disjunction of hypotheses MB[h1 &h2,e] =max( MB[h1 , e] , MB[h2 , e]) MD[h1 &h2,e] =min( MD[h1 , e] , MD[h2 , e])
and CF(h1 or h2) = MAX(CF(h1, CF(h2)). CF(R1) + CF(R2) - (CF(R1) * CF(R2)) when CF(R1) and CF(R2) are positive CF(R1) + CF(R2) + (CF(R1) * CF(R2)) when CF(R1) and CF(R2) are negative CF(R1) + CF(R2) ___________________ otherwise 1-MIN(|CF(R1)|, |CF(R2|)
REFERENCE:
1. Shortliffe, E.H.; Buchanan, B.G. (1975). "A model of inexact reasoning in medicine". Mathematical Biosciences 23 (3-4): 351379. doi:10.1016/00255564(75)90047-4. MR381762. 2. Buchanan, B.G.; Shortliffe, E.H. (1984). Rule Based Expert Systems: The MYCIN Experiments of the Stanford Heuristic Programming Project. Reading, MA: AddisonWesley. ISBN 9780201101720. 3. ^ Heckerman, D.; Shortliffe, E. (1992). "From certainty factors to belief networks". Artificial Intelligence in Medicine 4 (1): 3552. doi:10.1016/09333657(92)90036-O. 4. Yu, V.L., et al. (1979). "Antimicrobial selection by a computer: a blinded evaluation by infectious disease experts"