susan craw room sas b18a [email protected] case based reasoning advanced knowledge based...

33
Susan Craw Room SAS B18a [email protected] http://www.comp.rgu.ac.uk/staff/smc/teaching/ kbp3/ Case Based Reasoning Advanced Knowledge Based Systems Module CM4023

Upload: kyle-crawford

Post on 28-Mar-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

Susan Craw

Room SAS [email protected]

http://www.comp.rgu.ac.uk/staff/smc/teaching/kbp3/

Case Based Reasoning

Advanced Knowledge Based Systems Module CM4023

Page 2: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 2

How do we solve problems?

By knowing the steps to apply from symptoms to a plausible diagnosis

But not always applying causal knowledge diseases cause symptoms symptoms do not cause diseases!

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

Page 3: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 3

Another way we solve problems?

By remembering how we solved a similar problem in the past

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

Page 4: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 4

Problems we solve this way

Medicine doctor remembers previous patients especially for

rare combinations of symptoms Law

English/US law depends on precedence case histories are consulted

Management decisions are often based on past rulings

Financial performance is predicted by past results

Page 5: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 5

Retain Review

Adapt

Retrieve

Database

NewProblem

Similar

SolutionSolution

CBR Solving Problems

Page 6: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 6

CBR System Components

Case-base database of previous cases (experience) episodic memory

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)

Page 7: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 7

R4 Cycle

REUSEREUSEpropose solutions from retrieved cases

REVISEREVISEadapt and repair

proposed solution

CBRCBR

RETAINRETAINintegrate in

case-base

RETRIEVERETRIEVEfind similar problems

Page 8: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 8

Applications

Failure prediction ultrasonic NDT of rails for

Dutch railways water in oil wells for

Schlumberger

Failure analysis Mercedes cars for

DaimlerChrysler semiconductors at National

Semiconductor

Maintenance scheduling Boeing 737 engines TGV trains for SNCF

Planning mission planning for US

navy route planning for

DaimlerChrysler cars

Page 9: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 9

More Applications

e-Commerce sales support for

standard products

sales support for customised products

Personalisation TV listings from Changing

Worlds

music on demand from Kirch Media

news stories via car radios for DaimlerBenz

Re-Design gas taps for Copreci

Formulation (recipes) rubber for racing tyres for

Pirelli

tablets for AstraZeneca

Page 10: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 10

What’s in a Tablet?

surfactantaids wetting and

dissolution of drug

disintegrant

allows rapid break down after swallowing

lubricant

enables it to come out of the die

binder

makes it cohesive to hold togetherfiller

provides bulk to be large enough to handle and compress (~65%)

drug

active ingredient (~25%)

Page 11: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 11

Tablet Formulation Problem

Given: physical and chemical

properties of a drug desired dose

Knowing: properties of available excipients

Goal: choose 5 excipients and their quantities which achieve the desired mechanical

and chemical properties of the tablet

Solutionfiller DCP 92.3%binder GEL 2.1%lubricant MGS 1.0%disintegrant CRO 2.1%surfactant SLS 0.3%

Page 12: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 12

Tablet Formulation KnowledgeGet-Insoluble-Filler IF: Reqd-Filler-Solubility has value InsolubleFiller is-on Filler-AgendaSolubility has value Sol in FillerSlightly-Soluble has value Slightly-SolubleSol < Min-Val (Slightly-Soluble)THEN refine Filler to be Filler in FormulationRemove-Excessive-FillersIF: Filler is-on Filler-AgendaMax-Level of Filler is LevelFiller-Concentration has value ConcConc > LevelTHEN ... Heuristics

Try to balance physical properties with stable excipients

to achieve a tablet with viable properties

Drug PropertiesExcipient Properties

Drug/Excipient Stabilities

Chemical RelationshipsPhysical Relationships

Page 13: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 13

Retain Review

Adapt

Retrieve

Database

Dose & Propertiesof New Drug

Similar

SolutionSolution

tablets of similar dosewhose drugs have similar properties

formulationsfor existing

tablets

soluble drug? => insoluble fillerlarger dose? => less filler

CBR for Tablet Formulation

Page 14: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 14

CBR Assumption

New problem can be solved by retrieving similar problems adapting retrieved solutions

Similar problems have similar solutions

?

SSS

SS S

SS S

PP

PPPP

P

PP

X

Page 15: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 15

Why was filler X chosen?

The tablet in the case-base whose drug properties are most similar dose is most similar

is Drug-Y-50 and its filler is Z However adaptation is needed

because of a significant difference the stability of Z with the new drug

is much lower

Adaptation proposes filler X instead: greater stability with new drug similar properties to Z

Page 16: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 17

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

Page 17: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 18

Corporate Memory

Cases from database, archive, . . .

Issues case bias? currency? coverage? description language e.g. agreement on terms

Case-base cannot contain all formulations good coverage prototypical and exceptional cases

Opportunity for multiple sources several expert formulators shared knowledge across companies

Page 18: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 19

Case Representation

feature-value representation

exci

pien

t

amou

nt

exci

pien

t

amou

nt

exci

pien

t

amou

nt

exci

pien

t

amou

nt

exci

pien

t

amou

nt

YP SRS

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37feature #

tablet properties

caseextra infoproblem solution

filler surfactant

dose

physical properties

chemical properties

drug disintegrantbinder lubricant

Problem drug properties and dose

Solution excipients and their amounts

Extra tablet properties constrained features of

resulting tablet

Page 19: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 20

CBR Tool

C4.5 Index

K Nearest NeighbourSimilarityMatching

pro

gre

ss o

f re

trie

val

Database

Relevant Cases

Most SimilarCases

Vote

Tcl for adaptation

Gshadg hjshfdfhdjf hjkdhfs hjdshfl

hfdjsfhdjs hjdhfl hsdfhlhd hdjsh hjsdkh hfds hhfkfd shkGshadg hjshfd

fhdjf hjkdhfs hjdshflhfdjsfhdjs hjdhfl hsdfhl

hd hdjsh hjsdkh hfds hhfkfd shk

Page 20: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 21

Nearest Neighbour Retrieval

Retrieve most similar k-nearest neighbour

k-NN like scoring in bowls or curling

Example 1-NN 5-NN

Page 21: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 22

How do we measure similarity?

Distances between values of individual features problem and case have values p and c for feature f

Numeric features

f(problem,case) = |p - c|/(max difference)

Symbolic features

f(problem,case) = 0 if p = c = 1 otherwise

Distance is (problem,case) weighted sum of f(problem,case) for all features

Similarity(problem, case) = 1/(1+ (problem,case))

Page 22: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 23

High Low

200

0

100

300

Decision Trees as an Index

Solubility?

Dose??

?

?

?

low high

<200 >200

Page 23: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 24

Case Retrieval

Typical implementation e.g.

Case-Base indexedusing a decision-tree

Cases are “stored” in the index leaves…

from these the most similar are retrieved using similarity matching

Page 24: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 25

Why do we want an index?

Efficiency if similarity matching

is computationally expensive

Pre-selection of relevant cases some features of new

problem may make certain cases irrelevant . . .

despite being very similar High Low

200

0

100

300

Page 25: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 26

Case Retrieval Parameters

Selection of features inducing decision tree index

Parameters to induce decision tree index

Number of best-matches retrieved by similarity

measure

Weights for features similarity matching

Page 26: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 27

Are CBR Systems Easy to Develop?

Retain Review

Adapt

Retrieve

Database

Similar

PastCases

SimilarityKnowledge

AdaptationKnowledge

OK? NotNecessarily!

Page 27: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 28

CBRSystem

Databaseof previous

formulations

SimilarityMatching

Index

Case-base

Acquiring Knowledge

Adaptation

CBRA

Profiles

Adaptationrules

Page 28: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 29

Learning

Case-base inserting new cases into case-base updating contents of case-base to avoid mistakes

Retrieval Knowledge indexing knowledge

features used new indexing knowledge

similarity knowledge weighting new similarity knowledge

Adaptation knowledge

Page 29: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 30

CBR Resources

CBR Tools ReCall (www.isoft.fr), Orenge (www.tecinno.com)

Kaidara (www.kaidarausa.com) CBR Websites

www.ai-cbr.org www.aic.nrl.navy.mil/~aha/ www.scms.rgu.ac.uk/research/kbs/kacbd/

CBR Conferences ICCBR’01: www.iccbr.org/iccbr01/ UK-CBR’01: www.ai-cbr.org/ukcbr5/ ECCBR 2002: www.scms.rgu.ac.uk/eccbr2002/

Page 30: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 31

Reading

Useful texts (Kolodner 1993, Aamodt & Plaza 1994, Thompson 1997)

Our papers Case-Based Design for Tablet Formulation. Craw,

Wiratunga & Rowe. Proc. 4th European Workshop on CBR, p358-369, Springer, 1998.

Self-Optimising CBR Retrieval. Jarmulak, Craw & Rowe. Proc 12th Int Conf on Tools with AI. IEEE Press, 2000.

Using Case-Base Data to Learn Adaptation Knowledge for Design. Jarmulak, Craw & Rowe. Proc 17th Int Joint Conf on AI. AAAI Press, 2001.

Also see http://www.scms.rgu.ac.uk/research/kbs/kacbd/

Page 31: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 32

CBR vs Rule-based KBS

Rule-based a rule is generalised experience applies to range of examples currently do not learn as they solve problems knowledge acquisition bottleneck

Case-based reasoning cases include both prototypical cases and exceptions indexing, similarity and adaptation control effectiveness domain does not have an effective underlying theory learning updates case-base knowledge acquisition?

retrieval and adaptation knowledge

Page 32: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 33

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

Page 33: Susan Craw Room SAS B18a s.craw@comp.rgu.ac.uk  Case Based Reasoning Advanced Knowledge Based Systems

© The Robert Gordon University, Aberdeen 34

Summary

CBR Cycle retrieve, reuse, revise, retain

Knowledge containers case-base and description language retrieval and adaptation knowledge

CBR tools to ease development of CBR systems C4.5 index and k-NN retrieval adaptation?

Knowledge acquisition case knowledge can be easy retrieval/adaptation knowledge may not be easy