Скачать презентацию Case Based Reasoning PKB — Antonie Faced Скачать презентацию Case Based Reasoning PKB — Antonie Faced

91a4cd1e0961c754e7e43ae3e37ccb62.ppt

  • Количество слайдов: 39

Case Based Reasoning PKB - Antonie Case Based Reasoning PKB - Antonie

Faced this situation before? • Oops the car stopped. – What could have gone 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.

How do we solve problems? • By knowing the steps to apply – from 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

So what? • Reuse the solution experience when faced with a similar problem. • 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

What’s CBR? • To solve a new problem by remembering a previous similar situation 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

Definitions of CBR • Case-based reasoning is […] reasoning by remembering - Leake, 1996 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

History • Roots of CBR is found in the works of Roger Shank on 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.

The Limitations of Rules • The success of rule-based expert systems is due to 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…

CBR Cycle CBR Cycle

R 4 Cycle RETRIEVE RETAIN find similar problems integrate in case-base CBR REUSE propose R 4 Cycle RETRIEVE RETAIN find similar problems integrate in case-base CBR REUSE propose solutions from retrieved cases REVISE adapt and repair proposed solution

CBR System Components • Case-base – database of previous cases (experience) • Retrieval of 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)

CBR Assumption(s) • The main assumption is that: – Similar problems have similar solutions: 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)

Two big tasks of CBR • Classification tasks (good for CBR) – Diagnosis - 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

Technical Diagnosis of Car Faults Technical Diagnosis of Car Faults

Case Representation • Flat feature-value list • Object Oriented representation • Graph representation • 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

Problem to be solved Problem to be solved

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

CBR Knowledge Containers • Cases – lesson to be learned – context in which 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

Corporate Memory • Cases from database, archive, . . . • Issues – case 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

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

Retrieving A Car Diagnosis Case New Problem Similar? Case Case 1 • Compare new Retrieving A Car Diagnosis Case New Problem Similar? Case Case 1 • 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

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

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

Similarity Measurement • Purpose: To select the most relevant case • Basic Assumption: Similar 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. 8 Break Light does not work Front Light does not work. 4 Engine doesn’t start

Similarity Measurement • Feature: Battery Voltage 12. 6 . 9 13. 6 12. 6 Similarity Measurement • Feature: Battery Voltage 12. 6 . 9 13. 6 12. 6 . 1 6. 7 • Different features have different importance • Two kinds of Similarity Measures – Local Similarity – similarity on feature level – Global Similarity - similarity on case or object level

Reuse Solution from Case 1 Problem Case 1 • Symptom: headlight does not work Reuse Solution from Case 1 Problem Case 1 • Symptom: headlight does not work • … New Problem • • • Symptom: brakelight does not work Car: Ford Fiesta Year: 1997 Battery: 9. 2 v – Headlights: undamaged Headlight. Switch: ? 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

Matching strings • exact match: two strings are similar if they are spelled the 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).

Indexing: Why do we want an index? • Efficiency – if similarity matching is Indexing: Why do we want an index? • Efficiency – if similarity matching is computationally 300 expensive 200 • Relevancy of cases for similarity 100 matching 0 • Cases are preselected from casebase High Low

What to index? Case Features are: - Indexed - Unindexed Client Ref #: 64 What to index? Case Features are: - Indexed - Unindexed 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

Decision Trees as an Index ? Solubility? low 300 high 200 ? Dose? <200 Decision Trees as an Index ? Solubility? low 300 high 200 ? Dose? <200 ? >200 100 0 High ? Low

Re-Using Retrieved Solutions • Single retrieved solution – Re-use this solution • Multiple retrieved 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

How to Adapt the Solution • Adaptation alters proposed solution: • Null adaptation - 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

Automated Adaptation Methods • Substitution – change some part(s) of the retrieved solution – 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

Examples of Adaptation • CHEF – CBR system to plan Szechuan recipes • Hammond 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

Examples of Adaptation • Car diagnosis example – Symptoms, faults and repairs for brake 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

Retention • What can be learned – New experience to be retained as new 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?

Pros & Cons of CBR • Advantages – solutions are quickly proposed • derivation 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

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

CBR Resources • Books – I. Watson. Applying Knowledge Management: Techniques For Building Corporate 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/ • CBR Commercial Solutions – Orenge from www. empolis. com – Kaidara Adviser from (www. kaidara. com) – e. Gain (www. egain. com) • Customer Service & Contact Centre Software • CBR Tools in our School – CBR-Works from www. empolis. com – Re. Call from www. isoft. fr – Weka from www. cs. waikato. ac. nz