06<CBR>-1
Lecture 06 Case-Based Reasoning
• Topics– Case-based Reasoning Paradigm– Case as a Knowledge Representation
Technique– Case Retrieval– Case Selection– Case Adaptation– Case Learning– Case Retaining and Maintenance– Applications
06<CBR>-2
Case-based reasoning paradigm
• CBR architectureProblem
specification
Caseretrieval
Caseselection
Caseadaptation
Caselearning &retaining
Caselibrary
Adaptationplan
library
Adaptedsolution
06<CBR>-3
Case-based reasoning paradigm
• Advantages– Cases are easier to obtain than domain
knowledge– Most efficient if old solutions directly
apply– Efficient if little adaptation effort is
involved– Learning of case-specific knowledge is
possible– Learning of new cases is possible– A very good choice for supplement
reasoning mechanism
06<CBR>-4
Case as a KR technique
• A case typically consists of a problem specification, solution, and case-specific meta-knowledge
• Example case for medical diagnosis– Patient model, containing subjective findings,
objective findings, and pathology and laboratory examinations
– Diagnosis model, recording the scenario of how a diagnosis proceeds and the diagnosis result
– Specific adaptation knowledge, specifying the causal relationships among the symptoms, test data, and diseases; helping hypothesize the suspected diseases from the adapted case data.
– Differential diagnosis knowledge, helping differentiate diseases with analogous symptoms
06<CBR>-5
Case as a KR technique
•Patient modelI. Subjective findings:
1. Personal history: recurrent pneumonia2. Chief complaint: cough
II. Objective findings:1. Present illness: fever, dyspnea, hemoptysis,
chest pain2. Physical examination:
A. Temperature: 39.5C, Fever
B. Thorax and lungs: crackles abnormal breathing sound, …
C. Extremity: clubbing fingers
06<CBR>-6
Case as a KR technique
III. Pathology and Laboratory data:1. CBC-DC:
A. Hb: 13.5(g/dl) B. RBC: 4.17*106 C. WBC: 16,350 … 2. Biochemistry
A. A/G: 3.0/2.8, B. LDH: 0.5, C. CK: 30(U/L) D. CK-MB: 3(U/L) …3. Microbiology
A. Sputum: Bloody B. Culture: Pneumococcus …4. Body fluid analysis of pleural effusion
A. PH: 7.4 B. SG: 1.037 C. Protein: 3.8 D. Appear: Yellow clear …
IV. Imaging:1. Chest x-ray: Honeycombing appearance consolidation patch
06<CBR>-7
Case as a KR technique
• Diagnosis modelDisease type: RespiratoryAffected organ: PulmonaryImpression: Bronchitis, Pleural effusion, Hypersensitivity pneumonitis
06<CBR>-8
Case as a KR technique
• Case-specific adaptation knowledgeR1: IF (Input feature D = {x}) & (x V3) THEN D = {V3} R2: I F (disease type {respiratory}) & (present illness {fever, cough, sputum}) & (sputum smear = {gram negative}) THEN disease = {pneumonic(bacterial)}R3: I F (disease type {respiratory}) & (present illness {dyspnea}) THEN Imaging = {chest x-ray}
06<CBR>-9
Case as a KR technique
• Differential diagnosis knowledgeIF (B=V21) and (A=V12) and (D=V32) and (E=V42) THEN Solutions {S2}
06<CBR>-10
Case retrieval
• Case similarity measure• Vector space model
– p = vector of problem feature values – c = vector of case feature values– Values: numerical vs. categorical– Similarity function
– Θ: any function that return a number representing feature similarity between pi and ci
– i: weight of feature i
– normalization factor
i
iii cpcpsim ),(
06<CBR>-11
Case retrieval
• Enhanced by fuzzy logic– Feature values are fuzzy sets– Fuzzy similarity measure is calculated
according to fuzzy relationships – Example fuzzy relationships
Critical 1.00Severe 0.02 1.00Average 0.03 0.50 1.00Slight 0.01 0.50 0.75
1.00… … … … …
Slight Average Severe Critical
06<CBR>-12
Case retrieval
• Cluster-based similarity– Cluster selection: K-means, KNN, NN– Feature values are coded and fed into
the cluster for clustering (sometimes we may do classification)
– All cases Use are properly categorized into clusters
– Use the cluster of the problem to retrieve cases
06<CBR>-13
Case selection
• Select cases as candidate cases for adaptation by utility
• Utility = Similarity * Adaptability– Similarity measure as calculated before– Adaptability as a moderator to shape
the similarity
• Adaptability measure– Measure the degree of adaptability of a
feature according to feature value difference
– Take summary of average of the degrees into a case adaptability
)iWeight(FDiffer)iDiffer(FValue )iAD(F __1
06<CBR>-14
Case adaptation
• Adaptation methods• A single candidate case
– Similarity-based adaptation– Analogy-based adaptation– Derivation-based adaptation
• Multiple candidate cases– Combine cases into solutions
• Cases are not broken down
– Planning• Use a data structure to break down and
structure all candidate cases
06<CBR>-15
Case adaptation - Similarity-based feature adaptation operators
• Substitution refers to adaptation operators which replace or adjust a feature value
• Example operators– Parameter adjustment
• Adjust the old value to a new one with different significance.
• Precondition: <1, 0, ≠0, x, x>• Postcondition: <0, 0, 0, x, 1>
– Problem abstraction• Substitute in a high-level value in the domain
ontology.• Precondition: …; Postcondition: …
– Problem refinement• Substitute in a low-level value in the domain
ontology.• Precondition: …; Postcondition: …
06<CBR>-16
Case adaptation
• Transformation refers to restructuring, specialization, generalization, process refinement, domain enlargement, value modification or constraint change.
• Example operators– Constraint abstraction
• Generalize the feature value for a constraint into a higher-level value in the domain ontology.
• Precondition: …; Postcondition: …– Constraint deletion
• Delete the constraint if it conforms to the conditions.
• Precondition: …; Postcondition: …– Value specialization
• Specialize the old value into a new one if they belong to the same solution type and significance.
• Precondition: …; Postcondition: …
06<CBR>-17
Case adaptation
• Generation refers to regeneration or appending of features and/or values.
• Example operator– Value insertion
• Replace the unknown value with a new value.• Precondition: …; Postcondition: …
• Pre- and post-Condition measures the differences between cases and problem– Value difference measures how close feature
values are – Proximity difference measures how close a
feature is related to a disease– Seriousness difference of numeric value– Specificity difference about number of cases– Constraint violation measures the amount of
constraints or causal relations violated
06<CBR>-18
Case adaptation
• Planning method for adaptation– Candidate cases are broken down into a set of
related features, each with a (adaptation) utility– Develop a feature adaptation plan for each
feature in all candidate cases (consult adaptation plan library)
• Select a feature adaptation operator according to the feature difference measures
– Aggregate feature adaptation plans into a case adaptation plan
• according to the preconditions and postconditions of the feature adaptation operators
– Execute the case adaptation plan to generate a new case (adapted case)
06<CBR>-19
Case learning• Knowledge discovery from candidate
cases– Domain knowledge
• Ex: differential diagnosis knowledge by finding feature value differences among (similar) candidate cases
• Ex: diagnosis rules by mining associations among candidate cases
– Adaptation knowledge• By generalizing feature values appearing in a set
of candidate cases– Meta-knowledge
• Ex: case-specific verification knowledge by discovering associations of feature values which always appear together
06<CBR>-20
Case retaining and maintenance
• Retaining of adapted cases in case library– User evaluation
• Evaluate how an adapted case work for the given problem
– Case similarity• Case library should only contain
representative cases
• Maintenance of case library– Case credit
• User feedback on how a case performs – Case age
• Time-based or application history-based calculation of case age
06<CBR>-21
Applications
• Synthetic task– Design new shoes– Cook a new dish
• Analytic task– Medical diagnosis– ECG diagnosis