Lecture 3: CBR Case-Base Indexing

Slides:



Advertisements
Similar presentations
Case Based Reasoning Lecture 4: CBR Tutorial on Decision Trees.
Advertisements

Lecture 5: Reuse, Adaptation and Retention
COMP3740 CR32: Knowledge Management and Adaptive Systems
Web Usage Mining Classification Fang Yao MEMS Humboldt Uni zu Berlin.
Data Mining Lecture 9.
DECISION TREES. Decision trees  One possible representation for hypotheses.
Decision Tree Learning - ID3
Decision Trees Decision tree representation ID3 learning algorithm
Huffman code and ID3 Prof. Sin-Min Lee Department of Computer Science.
Decision Tree Approach in Data Mining
Decision Tree Algorithm (C4.5)
ICS320-Foundations of Adaptive and Learning Systems
Classification Techniques: Decision Tree Learning
Naïve Bayes: discussion
Decision Trees.
Decision Trees Instructor: Qiang Yang Hong Kong University of Science and Technology Thanks: Eibe Frank and Jiawei Han.
Classification: Decision Trees
Induction of Decision Trees
Biological Data Mining (Predicting Post-synaptic Activity in Proteins)
Decision Trees an Introduction.
Decision Trees Chapter 18 From Data to Knowledge.
Review. 2 Statistical modeling  “Opposite” of 1R: use all the attributes  Two assumptions: Attributes are  equally important  statistically independent.
K Nearest Neighbor Classification Methods Qiang Yang.
Classification and Prediction by Yen-Hsien Lee Department of Information Management College of Management National Sun Yat-Sen University March 4, 2003.
Inferring rudimentary rules
Algorithms for Classification: The Basic Methods.
K Nearest Neighbor Classification Methods Qiang Yang.
Classification: Decision Trees 2 Outline  Top-Down Decision Tree Construction  Choosing the Splitting Attribute  Information Gain and Gain Ratio.
Machine Learning Lecture 10 Decision Trees G53MLE Machine Learning Dr Guoping Qiu1.
5. Machine Learning ENEE 759D | ENEE 459D | CMSC 858Z
Data Mining – Algorithms: OneR Chapter 4, Section 4.1.
ID3 Algorithm Allan Neymark CS157B – Spring 2007.
Learning what questions to ask. 8/29/03Decision Trees2  Job is to build a tree that represents a series of questions that the classifier will ask of.
and Confidential NOTICE: Proprietary and Confidential This material is proprietary to A. Teredesai and GCCIS, RIT. Slide 1 Decision.
Classification II. 2 Numeric Attributes Numeric attributes can take many values –Creating branches for each value is not ideal The value range is usually.
Classification with Decision Trees and Rules Evgueni Smirnov.
Induction of Decision Trees. An Example Data Set and Decision Tree yes no yesno sunnyrainy no med yes smallbig outlook company sailboat.
Data Mining – Algorithms: Prism – Learning Rules via Separating and Covering Chapter 4, Section 4.4.
Classification I. 2 The Task Input: Collection of instances with a set of attributes x and a special nominal attribute Y called class attribute Output:
Lecture 7. Outline 1. Overview of Classification and Decision Tree 2. Algorithm to build Decision Tree 3. Formula to measure information 4. Weka, data.
Decision-Tree Induction & Decision-Rule Induction
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 29 and 30– Decision Tree Learning; ID3;Entropy.
Data Mining – Algorithms: Decision Trees - ID3 Chapter 4, Section 4.3.
 Classification 1. 2  Task: Given a set of pre-classified examples, build a model or classifier to classify new cases.  Supervised learning: classes.
Algorithms for Classification: The Basic Methods.
Data Mining – Algorithms: Naïve Bayes Chapter 4, Section 4.2.
Slide 1 DSCI 4520/5240: Data Mining Fall 2013 – Dr. Nick Evangelopoulos Lecture 5: Decision Tree Algorithms Material based on: Witten & Frank 2000, Olson.
Example: input data outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes.
K Nearest Neighbor Classification Methods. Training Set.
Data Management and Database Technologies 1 DATA MINING Extracting Knowledge From Data Petr Olmer CERN
Decision Tree Learning
An Introduction Student Name: Riaz Ahmad Program: MSIT( ) Subject: Data warehouse & Data Mining.
1 Classification: predicts categorical class labels (discrete or nominal) classifies data (constructs a model) based on the training set and the values.
Data Mining By Farzana Forhad CS 157B. Agenda Decision Tree and ID3 Rough Set Theory Clustering.
Machine Learning Recitation 8 Oct 21, 2009 Oznur Tastan.
Iterative Dichotomiser 3 By Christopher Archibald.
Decision Trees by Muhammad Owais Zahid
CSE343/543 Machine Learning: Lecture 4.  Chapter 3: Decision Trees  Weekly assignment:  There are lot of applications and systems using machine learning.
Data Mining Chapter 4 Algorithms: The Basic Methods Reporter: Yuen-Kuei Hsueh.
Review of Decision Tree Learning Bamshad Mobasher DePaul University Bamshad Mobasher DePaul University.
DECISION TREES An internal node represents a test on an attribute.
Decision Trees an introduction.
Classification Algorithms
Teori Keputusan (Decision Theory)
Artificial Intelligence
Data Science Algorithms: The Basic Methods
Decision Tree Saed Sayad 9/21/2018.
Decision Trees Jeff Storey.
Data Mining CSCI 307, Spring 2019 Lecture 15
Data Mining CSCI 307, Spring 2019 Lecture 6
Presentation transcript:

Lecture 3: CBR Case-Base Indexing Case Based Reasoning Lecture 3: CBR Case-Base Indexing

Outline Indexing CBR case knowledge Why might we want an index? Decision tree indexes C4.5 algorithm Summary

Why might we want an index? Efficiency Similarity matching is computationally expensive for large case-bases Similarity matching can be computationally expensive for complex case representations Relevancy of cases for similarity matching some features of new problem may make certain cases irrelevant despite being very similar Cases are pre-selected from case-base Similarity matching is applied to subset of cases

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

Indexed vs Unindexed Features Indexed features are: used for retrieval are predictive of the case’s solution Unindexed feature are: not used for retrieval not predictive of the case’s solution provide valuable contextual information and lessons learned

Playing Tennis Example (case-base) Outlook Temperature Humidity Windy Play Sunny Hot High False No True Cloudy Yes Rainy Mild Cool Normal

Decision Tree (Index) for Playing Tennis outlook sunny rainy cloudy Yes windy humidity normal high true false No Yes No Yes

Choosing the Root Attribute outlook humidity temperature windy sunny rainy high low hot cold true false cloudy mild Yes No Yes Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Which attribute is best for the root of the tree? - the one that gives the best information gain - in this case outlook (as we are going to see)

Building Decision Trees – C4.5 Algorithm Based on the Information Theory (Shannon 1948) Divide and conquer strategy Choose attribute for root node Create branch for each value of that attribute Split cases according to branches Repeat process for each branch until all cases in the branch have the same class Assumption: simplest tree which classifies the cases is best

Entropy of a set of cases Playing Tennis Example: S is the set of 14 cases We want to classify the cases according to the values of “Play”, i.e., Yes and No in this example. the proportion of “Yes” cases is 9 out of 14: 9/14 = 0.64 the proportion of “No” cases is 5 out of 14: 5/14 = 0.36 The Entropy measures the impurity of S Entropy (S) = - 0.64(log2 0.64) – 0.36(log2 0.36) = -0.64(-0.644)-0.36(-1.474) = 0.41+0.53 = 0.94 Outlook Temperature Humidity Windy Play Sunny Hot High False No Cloudy Yes … “No” case “Yes” case 14 cases

Entropy of a set of cases S is a set of cases A is a feature Play in the example {S1 ... Si … Sn} are the partitions of S according to values of A Yes and No in the example {P1 ... Pi … Pn} are the proportions of {S1 ... Si … Sn} in S

Gain of an attribute Calculate Gain (S, A) for each attribute A expected reduction in entropy due to sorting on A Choose the attribute with highest gain as root of tree Gain (S, A) = Entropy(S) – Expectation(A) {S1, ..., Si, …, Sn} = partitions of S according to values of attribute A n = number of attributes A |Si| = number of cases in the partition Si |S| = total number of cases in S

Which attribute is root? If Outlook is made root of the tree There are 3 partitions of the cases S1 for Sunny, S2 for Cloudy, S3 for Rainy S1(Sunny)= {cases 1,2,8,9,11} |S1| = 5 In these 5 cases values for Play are 3 No and 2 Yes Entropy(S1) = - 2/5 (log2 2/5) – 3/5(log2 3/5) = 0.97 Similarly Entropy(S2)= 0 Entropy(S3)= 0.97 Outlook Temperature Humidity Windy Play Sunny Hot High False No True Cloudy Yes Rainy Mild Cool Normal

Choosing the Root Attribute outlook humidity temperature windy sunny rainy high low hot cold true false cloudy mild Yes No Yes Yes No Yes No Yes No Yes No Yes No Yes No Yes No Yes No Which attribute is best for the root of the tree? - the one that gives the best information gain - in this case outlook (as we are going to see)

Which attribute is root? Gain(S, Outlook) = Entropy(S) – Expectation(Outlook) = Gain(S, Outlook) = 0.94 – [5/14 * 0.97 + 4/14 * 0 + 5/14 * 0.97] = 0.247 Similarly Gain(S, Temperature)= 0.059 Gain(S, Humidity)= 0.051 Gain(S, Windy)= 0.048 Gain(S, Outlook) is the highest gain Outlook should be the root of the decision tree (index)

Repeat for Sunny Node outlook outlook sunny rainy cloudy sunny rainy Yes ? temperature Yes ? windy sunny rainy hot mild cold cloudy false true No Yes No Yes Yes ? humidity Yes No Yes No high normal No Yes

Repeat for Rainy Node outlook sunny rainy cloudy Yes Mild High False Yes Cool Normal False Yes Cool Normal True No Mild Normal False Yes Mild High True No humidity high normal No Yes

Decision Tree (Index) for Playing Tennis outlook sunny rainy cloudy Yes windy humidity normal high true false No Yes No Yes

Case Retrieval via DTree Index Typical implementation e.g. Case-Base indexed using a decision-tree Cases are “stored” in the index leaves… DTree created from cases Automated indexing of case-base

Summary Decision tree is built from cases Decision tree is often used for problem-solving In CBR, decision tree is used to partition cases Similarity matching is applied to cases in leaf node Indexing pre-selects relevant cases for k-NN retrieval BRING CALCULATOR on MONDAY