Presentation on theme: "Case Based Reasoning Lecture 5: Reuse, Adaptation and Retention."— Presentation transcript:
Case Based Reasoning Lecture 5: Reuse, Adaptation and Retention
Outline Re-use How to re-use retrieved solutions Adaptation Why might we want to revise the solution? Types of adaptation Retention Why might we wish to retain cases?
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
Multiple Retrievals Whole solution generated in single retrieval Single components generated in each retrieval Parallel Incremental ? ? Problem Suggested Solution ? Subproblem ? Suggested Part Solution Suggested Part Solution ? ? Subproblem Suggested Part Solution ? Subproblem Suggested Solution
When is Adaptation Needed? Classification All solutions likely to be represented in case-base Adaptation corrects for lack of cases Constructive problem solving All designs unlikely to be represented in case-base Retrieved cases suggest initial design Adaptation alters the design to reflect novel feature values Redesign of Gas-taps (Copreci, Spain)
Assumptions for Adaptation Similar problems have similar solutions The effort required to adapt a retrieved solution will be less the more similar it is to the required solution
How to Adapt the Solution Adaptation alters proposed solution takes account of differences between new and retrieved problems 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 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 method of solution is part of retrieved case most complex form of adaptation
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 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
Adaptation in CBR-Works Provides adaptation rules IF a THEN b classic production rules Example Add £1000 to the price of a new car for a different colour
Adaptation in CBR-Works: Example Retrieval without adaptation
Adaptation in CBR-Works: Example Retrieval + adaptation Predicting value of the price attribute
Adaptation in CBR-Works: Example Adaptation rule to predict the value of Price
Other Rules in CBR-Works CBR-Works also uses completion rules to calculate a dependent attribute value set default value alter the feature weights in certain circumstances Used to complete a query fill-in missing data during case creation alter similarity calculations for retrieval
Adaptation in ReCall By default, ReCall uses the vote mechanism of k- NN to predict a value for the target attribute. E.g., the predicted value of the query (shown here in black) will be grey according to a 3-NN algorithm which retrieves 3 similar cases (2 in grey and 1 in beige)
Adaptation in ReCall Alternatively, ReCall allows you to write adaptation rules to predict a value for your query based on a single (most similar) case. You can use ReCalls own language, or use the more powerful and widely used language Tcl. To find out more: refer to ReCalls Lab notes.
Two Schools of Thought in CBR Adaptation is the most contentious issue in CBR One group believes adaptation is not important The problem cannot be solved using CBR A CBR system without adaptation capabilities is called CBR Retrieval System Others believe it is vital Without adaptation and generation of new solutions there is no reasoning in CBR A CBR system with adaptation capabilities is called fully-fledged CBR system
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?
Example Outlook=CloudyTemp.=CoolHumidity=HighWindy=FalsePlay= Yes Outlook=CloudyTemp.=MildHumidity=HighWindy=FalsePlay= No Do we need to retain the new case? Do we need to rebuild the decision tree index? outlook Yes sunny cloudy rainy humidity No Yes high normal windy NoYes truefalse
Summary Reuse Initial solution from retrieved cases Revise Adapt initial solution to reflect differences between new and retrieved problems CBR-Works adaptation rules Retain When to retain and whether to replace Representation and indexing
Reading Research Papers S. Craw, J. Jarmulak & R. Rowe. Learning and Applying Case-Based Adaptation Knowledge. Proceedings 4th ICCBR Conference, p , B. Smyth & M. T. Keane. Adaptation-Guided Retrieval: Questioning the similarity assumption. Artificial Intelligence 102: ,