Presentation is loading. Please wait.

Presentation is loading. Please wait.

Case Based Reasoning PKB - Antonie. Faced this situation before? Oops the car stopped. –What could have gone wrong? Aah.. Last time it happened, there.

Similar presentations


Presentation on theme: "Case Based Reasoning PKB - Antonie. Faced this situation before? Oops the car stopped. –What could have gone wrong? Aah.. Last time it happened, there."— Presentation transcript:

1 Case Based Reasoning PKB - Antonie

2 Faced this situation before? Oops the car stopped. –What could have gone wrong? Aah.. Last time it happened, there was no petrol. –Is there petrol? Yes. –Oh but wait I remember the tyre was punctured (ban bocor) This is the normal thought process of a human when faced with a problem which is similar to a problem he/she had faced before.

3 How do we solve problems? By knowing the steps to apply –from symptoms/gejala to a plausible diagnosis But not always applying causal knowledge –sebab - akibat How does an expert solve problems? –uses same “book learning” as a novice –but quickly selects the right knowledge to apply Heuristic knowledge (“rules of thumb”) –“I don’t know why this works but it does and so I’ll use it again!” –difficult to elicit

4 So what? Reuse the solution experience when faced with a similar problem. This is Case Based Reasoning (CBR)! –memory-based problem-solving –re-using past experiences Experts often find it easier to relate stories about past cases than to formulate rules

5 What’s CBR? To solve a new problem by remembering a previous similar situation and by reusing information and knowledge of that situation Ex: Medicine –doctor remembers previous patients especially for rare combinations of symptoms Ex: Law –English/US law depends on precedence –case histories are consulted Ex: Management –decisions are often based on past rulings Ex: Financial –performance is predicted by past results

6 Definitions of CBR Case-based reasoning is […] reasoning by remembering - Leake, 1996 A case-based reasoner solves new problems by adapting solutions that were used to solve old problems - Riesbeck & Schank, 1989 Case-based reasoning is a recent approach to problem solving and learning […] - Aamodt & Plaza, 1994

7 History Roots of CBR is found in the works of Roger Shank on dynamic memory. Other trails into the CBR field has come from –Analogical reasoning –Problem solving and experimental learning within philosophy and psychology The first CBR system, CYRUS developed by Janet Kolodner at Yale university.

8 The Limitations of Rules The success of rule-based expert systems is due to several factors: –They can mimic some human problem-solving strategies –Rules are a part of everyday life, so people can relate to them However, a significant limitation is the knowledge elicitation bottleneck –Experts may be unable to articulate their expertise Heuristic knowledge is particularly difficult –Experts may be too busy…

9 CBR Cycle

10 R 4 Cycle REUSE propose solutions from retrieved casesREVISE adapt and repair proposed solution RETAIN integrate in case-baseRETRIEVE find similar problems

11 CBR System Components Case-base –database of previous cases (experience) Retrieval of relevant cases –index for cases in library –matching most similar case(s) –retrieving the solution(s) from these case(s) Adaptation of solution –alter the retrieved solution(s) to reflect differences between new case and retrieved case(s)

12 CBR Assumption(s) The main assumption is that: –Similar problems have similar solutions: e.g., an aspirin can be taken for any mild pain Two other assumptions: –The world is a regular place: what holds true today will probably hold true tomorrow (e.g., if you have a headache, you take aspirin, because it has always helped) –Situations repeat: if they do not, there is no point in remembering them (e.g., it helps to remember how you found a parking space near that restaurant)

13 Two big tasks of CBR Classification tasks (good for CBR) –Diagnosis - what type of fault is this? –Prediction / estimation - what happened when we saw this pattern before? Synthesis tasks (harder for CBR) –Engineering Design –Planning –Scheduling

14 Technical Diagnosis of Car Faults

15 Case Representation Flat feature-value list Object Oriented representation Graph representation The choice of representation is –Dependent on requirements of domain and task –Structure of already available case data

16 Problem to be solved

17 How CBR solves problems New problem can be solved by –retrieving similar problems –adapting retrieved solutions Similar problems have similar solutions ? S SS S S S S S S P P P P P P P P P X

18 CBR Knowledge Containers Cases –lesson to be learned –context in which lesson applies Description Language –features and values of problem/solution Retrieval Knowledge –features used to index cases –relative importance of features used for similarity Adaptation Knowledge –circumstances when adaptation is needed –alteration to apply

19 Corporate Memory Cases from database, archive,... Issues –case bias? coverage? –description language e.g. agreement on terms Case-base cannot contain all formulations –good coverage –prototypical and exceptional cases Opportunity for multiple sources –shared knowledge across companies

20 New Car Diagnosis Problem A new problem is a case without a solution part Not all problem features must be known –same for cases –Problem Symptom: brakelight does not work Car: Ford Fiesta Year: 1997 Battery: 9.2v Headlights: undamaged HeadlightSwitch: ? Feature Value New

21 Compare new problem to each case Select most similar Similarity is most important concept in CBR –When are two cases similar? –How are cases ranked according to similarity? Similarity of cases –Similarity for each feature Depends on feature values Retrieving A Car Diagnosis Case New Problem Case Case 1 Similar?

22 Similarity Computation for case 1 Figure Credit: R. Bergmann, University of Kaiserslautern

23 Similarity Computation for case 2 Figure Credit: R. Bergmann, University of Kaiserslautern

24 Similarity Measurement Purpose: To select the most relevant case Basic Assumption: Similar problems have similar solutions Similarity value between 0 and 1 are assigned for feature value pairs E.g.: Feature: Problem Front Light does not work Break Light does not work.8 Front Light does not work Engine doesn’t start.4

25 Similarity Measurement Feature: Battery Voltage Different features have different importance Two kinds of Similarity Measures –Local Similarity – similarity on feature level –Global Similarity - similarity on case or object level 12.6 13.612.6 6.7.9.1

26 Calculating Feature Similarity Distances between values of individual features –problem and case have values p and c for feature f –Distance for Numeric features d f (problem,case) = |p - c|/(max difference) –Distance for Symbolic features d f (problem,case)= 0 if p = c = 1 otherwise Similarity f (problem,case) = 1 - d Degree of similarity is between 0 and 1

27 Reuse Solution from Case 1 New Problem Symptom: brakelight does not work Car: Ford Fiesta Year: 1997 Battery: 9.2v Headlights: undamaged HeadlightSwitch: ? Problem Symptom: headlight does not work … Solution Diagnosis: headlight fuse blown Repair: replace headlight fuse –Solution to New Problem Diagnosis: headlight fuse blown Repair: replace headlight fuse –After Adaptation Diagnosis: brakelight fuse blown Repair: replace brakelight fuse Case 1

28 Matching strings exact match: two strings are similar if they are spelled the same way spelling check: compares the number of letters which are the same in two strings (Useful for strings consisting of one word only) word-count: counts the number of matching words of two cases. (Useful for strings consisting of several words).

29 Indexing: Why do we want an index? Efficiency –if similarity matching is computationally expensive Relevancy of cases for similarity matching Cases are pre- selected from case- base HighLow 200 0 100 300

30 What to index? Client Ref #: 64 Client Name: John Smith Address: 39 Union Street Tel: 01224 665544 Photo: Age: 37 Occupation: IT Analyst Income: £ 20000 … Unindexed features Indexed features Case Features are: - Indexed - Unindexed

31 HighLow 200 0 100 300 Decision Trees as an Index Solubility? Dose?? ? ? ? lowhigh <200>200

32 Re-Using Retrieved Solutions Single retrieved solution –Re-use this solution Multiple retrieved solutions –Vote/average of retrieved solutions Weighted according to –Ranking –Similarity Iterative retrieval –Solve components of the solution one at a time

33 How to Adapt the Solution Adaptation alters proposed solution: Null adaptation - copy retrieved solution –Used by CBR-Lite systems Manual or interactive adaptation –User adapts the retrieved solution (Adapting is easier than solving?) Automated adaptation –CBR system is able to adapt the retrieved solution –Adaptation knowledge required

34 Automated Adaptation Methods Substitution –change some part(s) of the retrieved solution –simplest and most common form of adaptation Transformation –alters the structure of the solution Generative –replays the method of deriving the retrieved solution on the new problem –most complex form of adaptation

35 Examples of Adaptation CHEF –CBR system to plan Szechuan recipes Hammond (1990) Substitution adaptation –substitute ingredients in the retrieved recipe to match the menu Retrieved recipe contains beef and broccoli New menu requires chicken and snowpeas Replace chicken for beef, snowpeas for broccoli Transformation adaptation –Add, change or remove steps in the recipe Skinning step added for chicken, not done for beef

36 Examples of Adaptation Car diagnosis example –Symptoms, faults and repairs for brake lights are analogous to those for headlight –Substitution: brake light fuse Planning example –Train journeys and flights are analogous –Transformation: flights need check-in step added

37 Retention What can be learned –New experience to be retained as new case –Representing the new case Contents of new case Indexing of new case Forgetting cases –For efficiency or because out of date –Deleting an old case Old is not necessarily bad Does it leave a gap?

38 Pros & Cons of CBR Advantages –solutions are quickly proposed derivation from scratch is avoided –domains do not need to be completely understood –cases useful for open-ended/ill-defined concepts –highlights important features Disadvantages –old cases may be poor –library may be biased –most appropriate cases may not be retrieved –retrieval/adaptation knowledge still needed

39 CBR Tool C4.5 Index K Nearest Neighbour Similarity Matching progress of retrieval Database Relevant Cases Most Similar Cases Vote Tcl for adaptation Gshadg hjshfd fhdjf hjkdhfs hjdshfl hfdjsfhdjs hjdhfl hsdfhl hd hdjsh hjsdkh hfds hhfkfd shk Gshadg hjshfd fhdjf hjkdhfs hjdshfl hfdjsfhdjs hjdhfl hsdfhl hd hdjsh hjsdkh hfds hhfkfd shk

40 CBR Resources Books –I. Watson. Applying Knowledge Management: Techniques For Building Corporate Memories. Morgan Kaufmann, 2003. –I. Watson. Applying Case-Based Reasoning: Techniques for Enterprise Systems. Morgan Kaufmann, 1997. CBR on the web –http://groups.yahoo.com/group/case-based-reasoning/http://groups.yahoo.com/group/case-based-reasoning/ CBR Commercial Solutions –Orenge from www.empolis.comwww.empolis.com –Kaidara Adviser from (www.kaidara.com)www.kaidara.com –eGain (www.egain.com)www.egain.com Customer Service & Contact Centre Software CBR Tools in our School –CBR-Works from www.empolis.comwww.empolis.com –ReCall from www.isoft.frwww.isoft.fr –Weka from www.cs.waikato.ac.nzwww.cs.waikato.ac.nz


Download ppt "Case Based Reasoning PKB - Antonie. Faced this situation before? Oops the car stopped. –What could have gone wrong? Aah.. Last time it happened, there."

Similar presentations


Ads by Google