SlideShare a Scribd company logo
1 of 30
Tilani Gunawardena
Covering(Rule-Based)
Algorithms
Example: generating a rule
• Possible rule set for class “a”
• If x > 1.2 then class = a
• If x > 1.2 and y > 2.6 then class = a
• Possible rule set for class “b”:
• If x ≤ 1.2 then class = b
• If x > 1.2 and y ≤ 2.6 then class = b
• Could add more rules, get “perfect” rule set
• Corresponding decision tree: (produces exactly the same
predictions)
• But: rule sets can be more perspicuous when decision trees
suffer from replicated subtrees
• Also: in multiclass situations, covering algorithm
concentrates on one class at a time whereas decision tree
learner takes all classes into account
Rules vs Trees
• Generates a rule by adding tests that
maximize rule’s accuracy
• Similar to situation in decision trees: problem
of selecting an attribute to split on
• Each new test reduces rule’s coverage:
Simple covering algorithm
• Convert decision tree into a rule set
– Straightforward, but rule set overly complex
– More effective conversions are not trivial
• Instead, can generate rule set directly
– for each class in turn find rule set that covers all
instances in it
(excluding instances not in the class)
• Called a covering approach:
– at each stage a rule is identified that “covers”
some of the instances
Covering Algorithms
Selecting a test
• Goal: maximize accuracy
– t total number of instances covered by rule
– p positive examples of the class covered by rule
– t – p number of errors made by rule
 Select test that maximizes the ratio p/t
• We are finished when p/t = 1 or the set of instances can’t be
split any further
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope No Reduced None
Young Myope No Normal Soft
Young Myope Yes Reduced None
Young Myope Yes Normal Hard
Young Hypermetrope No Reduced None
Young Hypermetrope No Normal Soft
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal Hard
Pre-presbyopic Myope No Reduced None
Pre-presbyopic Myope No Normal Soft
Pre-presbyopic Myope Yes Reduced None
Pre-presbyopic Myope Yes Normal Hard
Pre-presbyopic Hypermetrope No Reduced None
Pre-presbyopic Hypermetrope No Normal Soft
Pre-presbyopic Hypermetrope Yes Reduced None
Pre-presbyopic Hypermetrope Yes Normal None
Presbyopic Myope No Reduced None
Presbyopic Myope No Normal None
Presbyopic Myope Yes Reduced None
Presbyopic Myope Yes Normal Hard
Presbyopic Hypermetrope No Reduced None
Presbyopic Hypermetrope No Normal Soft
Presbyopic Hypermetrope Yes Reduced None
Presbyopic Hypermetrope Yes Normal None
Example: Contact lens data
• Rule we seek:
• Possible tests:
Age = Young
Age = Pre-presbyopic
Age = Presbyopic
Spectacle prescription = Myope
Spectacle prescription = Hypermetrope
Astigmatism = no
Astigmatism = yes
Tear production rate = Reduced
Tear production rate = Normal
If ?
then recommendation = hard
Example: Contact lens data
• Rule we seek:
• Possible tests:
Age = Young 2/8
Age = Pre-presbyopic 1/8
Age = Presbyopic 1/8
Spectacle prescription = Myope 3/12
Spectacle prescription = Hypermetrope 1/12
Astigmatism = no 0/12
Astigmatism = yes 4/12
Tear production rate = Reduced 0/12
Tear production rate = Normal 4/12
If ?
then recommendation = hard
Modified rule and resulting data
• Rule with best test added:
• Instances covered by modified rule:
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope Yes Reduced None
Young Myope Yes Normal Hard
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal hard
Pre-presbyopic Myope Yes Reduced None
Pre-presbyopic Myope Yes Normal Hard
Pre-presbyopic Hypermetrope Yes Reduced None
Pre-presbyopic Hypermetrope Yes Normal None
Presbyopic Myope Yes Reduced None
Presbyopic Myope Yes Normal Hard
Presbyopic Hypermetrope Yes Reduced None
Presbyopic Hypermetrope Yes Normal None
If astigmatism = yes
then recommendation = hard
Further refinement
• Current state:
• Possible tests:
Age = Young
Age = Pre-presbyopic
Age = Presbyopic
Spectacle prescription = Myope
Spectacle prescription = Hypermetrope
Tear production rate = Reduced
Tear production rate = Normal
If astigmatism = yes
and ?
then recommendation = hard
Further refinement
• Current state:
• Possible tests:
Age = Young 2/4
Age = Pre-presbyopic 1/4
Age = Presbyopic 1/4
Spectacle prescription = Myope 3/6
Spectacle prescription = Hypermetrope 1/6
Tear production rate = Reduced 0/6
Tear production rate = Normal 4/6
If astigmatism = yes
and ?
then recommendation = hard
Modified rule and resulting data
• Rule with best test added:
• Instances covered by modified rule:
Age Spectacle prescription Astigmatism Tear production rate Recommended
lenses
Young Myope Yes Normal Hard
Young Hypermetrope Yes Normal hard
Pre-presbyopic Myope Yes Normal Hard
Pre-presbyopic Hypermetrope Yes Normal None
Presbyopic Myope Yes Normal Hard
Presbyopic Hypermetrope Yes Normal None
If astigmatism = yes
and tear production rate = normal
then recommendation = hard
Further refinement
• Current state:
• Possible tests:
• Tie between the first and the fourth test
– We choose the one with greater coverage
Age = Young 2/2
Age = Pre-presbyopic 1/2
Age = Presbyopic 1/2
Spectacle prescription = Myope 3/3
Spectacle prescription = Hypermetrope 1/3
If astigmatism = yes
and tear production rate = normal
and ?
then recommendation = hard
The result
• Final rule:
• Second rule for recommending “hard lenses”:
(built from instances not covered by first rule)
If astigmatism = yes
and tear production rate = normal
and spectacle prescription = myope
then recommendation = hard
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope No Reduced None
Young Myope No Normal Soft
Young Myope Yes Reduced None
Young Myope Yes Normal Hard
Young Hypermetrope No Reduced None
Young Hypermetrope No Normal Soft
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal Hard
Pre-presbyopic Myope No Reduced None
Pre-presbyopic Myope No Normal Soft
Pre-presbyopic Myope Yes Reduced None
Pre-presbyopic Myope Yes Normal Hard
Pre-presbyopic Hypermetrope No Reduced None
Pre-presbyopic Hypermetrope No Normal Soft
Pre-presbyopic Hypermetrope Yes Reduced None
Pre-presbyopic Hypermetrope Yes Normal None
Presbyopic Myope No Reduced None
Presbyopic Myope No Normal None
Presbyopic Myope Yes Reduced None
Presbyopic Myope Yes Normal Hard
Presbyopic Hypermetrope No Reduced None
Presbyopic Hypermetrope No Normal Soft
Presbyopic Hypermetrope Yes Reduced None
Presbyopic Hypermetrope Yes Normal None
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope No Reduced None
Young Myope No Normal Soft
Young Myope Yes Reduced None
Young Myope Yes Normal Hard
Young Hypermetrope No Reduced None
Young Hypermetrope No Normal Soft
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal Hard
Pre-presbyopic Myope No Reduced None
Pre-presbyopic Myope No Normal Soft
Pre-presbyopic Myope Yes Reduced None
Pre-presbyopic Myope Yes Normal Hard
Pre-presbyopic Hypermetrope No Reduced None
Pre-presbyopic Hypermetrope No Normal Soft
Pre-presbyopic Hypermetrope Yes Reduced None
Pre-presbyopic Hypermetrope Yes Normal None
Presbyopic Myope No Reduced None
Presbyopic Myope No Normal None
Presbyopic Myope Yes Reduced None
Presbyopic Myope Yes Normal Hard
Presbyopic Hypermetrope No Reduced None
Presbyopic Hypermetrope No Normal Soft
Presbyopic Hypermetrope Yes Reduced None
Presbyopic Hypermetrope Yes Normal None
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope No Reduced None
Young Myope No Normal Soft
Young Myope Yes Reduced None
Young Hypermetrope No Reduced None
Young Hypermetrope No Normal Soft
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal Hard
Pre-presbyopic Myope No Reduced None
Pre-presbyopic Myope No Normal Soft
Pre-presbyopic Myope Yes Reduced None
Pre-presbyopic Hypermetrope No Reduced None
Pre-presbyopic Hypermetrope No Normal Soft
Pre-presbyopic Hypermetrope Yes Reduced None
Pre-presbyopic Hypermetrope Yes Normal None
Presbyopic Myope No Reduced None
Presbyopic Myope No Normal None
Presbyopic Myope Yes Reduced None
Presbyopic Hypermetrope No Reduced None
Presbyopic Hypermetrope No Normal Soft
Presbyopic Hypermetrope Yes Reduced None
Presbyopic Hypermetrope Yes Normal None
Example: Contact lens data
• Rule we seek:
• Possible tests:
Age = Young
Age = Pre-presbyopic
Age = Presbyopic
Spectacle prescription = Myope
Spectacle prescription = Hypermetrope
Astigmatism = no
Astigmatism = yes
Tear production rate = Reduced
Tear production rate = Normal
If ?
then recommendation = hard
Example: Contact lens data
• Rule we seek:
• Possible tests:
Age = Young 1/7
Age = Pre-presbyopic 0/7
Age = Presbyopic 0/7
Spectacle prescription = Myope 0/9
Spectacle prescription = Hypermetrope 1/12
Astigmatism = no 0/12
Astigmatism = yes 1/9
Tear production rate = Reduced 0/12
Tear production rate = Normal 1/9
If ?
then recommendation = hard
Modified rule and resulting data
• Rule with best test added:
• Instances covered by modified rule:
If age = Young
then recommendation = hard
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope No Reduced None
Young Myope No Normal Soft
Young Myope Yes Reduced None
Young Hypermetrope No Reduced None
Young Hypermetrope No Normal Soft
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal Hard
Further refinement
• Current state:
• Possible tests:
If age = Young
and ?
then recommendation = hard
Spectacle prescription = Myope
Spectacle prescription = Hypermetrope
Astigmatism = no
Astigmatism = yes
Tear production rate = Reduced
Tear production rate = Normal
Further refinement
• Current state:
• Possible tests:
If age = Young
and ?
then recommendation = hard
Spectacle prescription = Myope 0/3
Spectacle prescription = Hypermetrope 1/4
Astigmatism = no 0/4
Astigmatism = yes 1/3
Tear production rate = Reduced 0/4
Tear production rate = Normal 1/3
Modified rule and resulting data
• Rule with best test added:
• Instances covered by modified rule:
If age = Young
and Astigmatism = yes
then recommendation = hard
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope Yes Reduced None
Young Hypermetrope Yes Reduced None
Young Hypermetrope Yes Normal Hard
Further refinement
• Current state:
• Possible tests:
Spectacle prescription = Myope
Spectacle prescription = Hypermetrope
Tear production rate = Reduced
Tear production rate = Normal
If age = Young
and Astigmatism = yes
and ?
then recommendation = hard
Further refinement
• Current state:
• Possible tests:
Spectacle prescription = Myope 0/1
Spectacle prescription = Hypermetrope 1/2
Tear production rate = Reduced 0/2
Tear production rate = Normal 1/1
If age = Young
and Astigmatism = yes
and ?
then recommendation = hard
Final Results
If age = Young
and astigmatism = yes
and tear production rate=normal
then recommendation = hard
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope Yes Normal Hard
Young Hypermetrope Yes Normal Hard
If astigmatism = yes
and tear production rate = normal
and spectacle prescription = myope
then recommendation = hard
Age Spectacle prescription Astigmatism Tear production rate Recommended lenses
Young Myope Yes Normal Hard
Pre-presbyopic Myope Yes Normal Hard
Presbyopic Myope Yes Normal Hard
Pseudo-code for PRISM
For each class C
Initialize E to the instance set
While E contains instances in class C
Create a rule R with an empty left-hand side that predicts class C
Until R is perfect (or there are no more attributes to use) do
For each attribute A not mentioned in R, and each value v,
Consider adding the condition A = v to the left-hand side of R
Select A and v to maximize the accuracy p/t
(break ties by choosing the condition with the largest p)
Add A = v to R
Remove the instances covered by R from E
• PRISM with outer loop removed generates a
decision list for one class
– Subsequent rules are designed for rules that are
not covered by previous rules
– Order doesn’t matter because all rules predict the
same class
• Outer loop considers all classes separately
– No order dependence implied
Separate and conquer
• Methods like PRISM (for dealing with one
class) are separate-and-conquer algorithms:
– First, a rule is identified
– Then, all instances covered by the rule are
separated out
– Finally, the remaining instances are “conquered”
• Difference to divide-and-conquer methods:
– Subset covered by rule doesn’t need to be
explored any further

More Related Content

What's hot

Anomaly Detection at Scale!
Anomaly Detection at Scale!Anomaly Detection at Scale!
Anomaly Detection at Scale!Databricks
 
Cloud security and security architecture
Cloud security and security architectureCloud security and security architecture
Cloud security and security architectureVladimir Jirasek
 
Regulating Generative AI - LLMOps pipelines with Transparency
Regulating Generative AI - LLMOps pipelines with TransparencyRegulating Generative AI - LLMOps pipelines with Transparency
Regulating Generative AI - LLMOps pipelines with TransparencyDebmalya Biswas
 
Cloud Migration - Cloud Computing Benefits & Issues
Cloud Migration - Cloud Computing Benefits & IssuesCloud Migration - Cloud Computing Benefits & Issues
Cloud Migration - Cloud Computing Benefits & IssuesArtizen, Inc.
 
Breaking down the economics and tco of migrating to aws - Toronto
Breaking down the economics and tco of migrating to aws - TorontoBreaking down the economics and tco of migrating to aws - Toronto
Breaking down the economics and tco of migrating to aws - TorontoAmazon Web Services
 
Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...
Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...
Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...Amazon Web Services
 
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~SORACOM, INC
 
Introduction to AWS Services and Cloud Computing
Introduction to AWS Services and Cloud ComputingIntroduction to AWS Services and Cloud Computing
Introduction to AWS Services and Cloud ComputingAmazon Web Services
 
20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf
20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf
20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdfNTTDOCOMO-ServiceInnovation
 
Socrates: Atlassian's Data Lake - AWS Summit Sydney
Socrates: Atlassian's Data Lake - AWS Summit SydneySocrates: Atlassian's Data Lake - AWS Summit Sydney
Socrates: Atlassian's Data Lake - AWS Summit SydneyAmazon Web Services
 
AI: A risk and way to manage risk
AI: A risk and way to manage riskAI: A risk and way to manage risk
AI: A risk and way to manage riskKaran Sachdeva
 
Machine Learning & Amazon SageMaker
Machine Learning & Amazon SageMakerMachine Learning & Amazon SageMaker
Machine Learning & Amazon SageMakerAmazon Web Services
 

What's hot (20)

Anomaly Detection at Scale!
Anomaly Detection at Scale!Anomaly Detection at Scale!
Anomaly Detection at Scale!
 
Amazon SageMaker
Amazon SageMakerAmazon SageMaker
Amazon SageMaker
 
Cloud security and security architecture
Cloud security and security architectureCloud security and security architecture
Cloud security and security architecture
 
Regulating Generative AI - LLMOps pipelines with Transparency
Regulating Generative AI - LLMOps pipelines with TransparencyRegulating Generative AI - LLMOps pipelines with Transparency
Regulating Generative AI - LLMOps pipelines with Transparency
 
Machine Learning at the Edge
Machine Learning at the EdgeMachine Learning at the Edge
Machine Learning at the Edge
 
Cloud Migration - Cloud Computing Benefits & Issues
Cloud Migration - Cloud Computing Benefits & IssuesCloud Migration - Cloud Computing Benefits & Issues
Cloud Migration - Cloud Computing Benefits & Issues
 
Cloud Computing
Cloud Computing Cloud Computing
Cloud Computing
 
Cloud Foundations
Cloud FoundationsCloud Foundations
Cloud Foundations
 
Breaking down the economics and tco of migrating to aws - Toronto
Breaking down the economics and tco of migrating to aws - TorontoBreaking down the economics and tco of migrating to aws - Toronto
Breaking down the economics and tco of migrating to aws - Toronto
 
Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...
Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...
Introduction to the Well-Architected Framework and Tool - SVC212 - Chicago AW...
 
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
 
Introduction to AWS Services and Cloud Computing
Introduction to AWS Services and Cloud ComputingIntroduction to AWS Services and Cloud Computing
Introduction to AWS Services and Cloud Computing
 
Amazon Web Services (AWS) Case study
Amazon Web Services (AWS) Case studyAmazon Web Services (AWS) Case study
Amazon Web Services (AWS) Case study
 
Aws storage
Aws storageAws storage
Aws storage
 
20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf
20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf
20240201_大規模通信制御信号 ETLシステムにおける 大幅なコスト削減・意識改革の取り組み.pdf
 
Responsible AI
Responsible AIResponsible AI
Responsible AI
 
Socrates: Atlassian's Data Lake - AWS Summit Sydney
Socrates: Atlassian's Data Lake - AWS Summit SydneySocrates: Atlassian's Data Lake - AWS Summit Sydney
Socrates: Atlassian's Data Lake - AWS Summit Sydney
 
AI: A risk and way to manage risk
AI: A risk and way to manage riskAI: A risk and way to manage risk
AI: A risk and way to manage risk
 
Machine Learning & Amazon SageMaker
Machine Learning & Amazon SageMakerMachine Learning & Amazon SageMaker
Machine Learning & Amazon SageMaker
 
Security & Compliance in AWS
Security & Compliance in AWSSecurity & Compliance in AWS
Security & Compliance in AWS
 

Similar to Covering algorithm

Prescribing for refractive errors - presentation at www.eyenirvaan.com
Prescribing for refractive errors - presentation at www.eyenirvaan.comPrescribing for refractive errors - presentation at www.eyenirvaan.com
Prescribing for refractive errors - presentation at www.eyenirvaan.comEyenirvaan
 
Machine Learning: finding patterns Outline
Machine Learning: finding patterns OutlineMachine Learning: finding patterns Outline
Machine Learning: finding patterns Outlinebutest
 
Crash Course: Prescribing Eyeglasses in Children
Crash Course: Prescribing Eyeglasses in ChildrenCrash Course: Prescribing Eyeglasses in Children
Crash Course: Prescribing Eyeglasses in ChildrenAlvina Pauline Santiago, MD
 
Lecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsLecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsPrithwis Mukerjee
 
Machine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to ClassificationMachine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to ClassificationPier Luca Lanzi
 
MUGABI ON ASTIGMATISM.pptx
MUGABI ON ASTIGMATISM.pptxMUGABI ON ASTIGMATISM.pptx
MUGABI ON ASTIGMATISM.pptxBARNABASMUGABI
 
Lecture 03 Data Representation
Lecture 03 Data RepresentationLecture 03 Data Representation
Lecture 03 Data RepresentationPier Luca Lanzi
 
Glasses prescription clinical tips.pptx
Glasses prescription clinical tips.pptxGlasses prescription clinical tips.pptx
Glasses prescription clinical tips.pptxMohamed Elkadim
 
Passive Therapy in Management of Amblyopia (healthkura.com)
Passive Therapy in Management of Amblyopia (healthkura.com)Passive Therapy in Management of Amblyopia (healthkura.com)
Passive Therapy in Management of Amblyopia (healthkura.com)Bikash Sapkota
 
tips in prescribing children glasses.pptx
tips in prescribing children glasses.pptxtips in prescribing children glasses.pptx
tips in prescribing children glasses.pptxAmr mohamed
 
Prescription of glasses in children
Prescription of glasses in childrenPrescription of glasses in children
Prescription of glasses in childrenEranda Wannigama
 
mod_02_intro_ml.ppt
mod_02_intro_ml.pptmod_02_intro_ml.ppt
mod_02_intro_ml.pptbutest
 
Real Refractive error and spectacle correction.ppt
Real Refractive error and spectacle correction.pptReal Refractive error and spectacle correction.ppt
Real Refractive error and spectacle correction.pptBipin Koirala
 
Part XIV
Part XIVPart XIV
Part XIVbutest
 

Similar to Covering algorithm (20)

Prescribing for refractive errors - presentation at www.eyenirvaan.com
Prescribing for refractive errors - presentation at www.eyenirvaan.comPrescribing for refractive errors - presentation at www.eyenirvaan.com
Prescribing for refractive errors - presentation at www.eyenirvaan.com
 
Machine Learning: finding patterns Outline
Machine Learning: finding patterns OutlineMachine Learning: finding patterns Outline
Machine Learning: finding patterns Outline
 
Crash Course: Prescribing Eyeglasses in Children
Crash Course: Prescribing Eyeglasses in ChildrenCrash Course: Prescribing Eyeglasses in Children
Crash Course: Prescribing Eyeglasses in Children
 
Lecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsLecture02 - Data Mining & Analytics
Lecture02 - Data Mining & Analytics
 
Machine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to ClassificationMachine Learning and Data Mining: 10 Introduction to Classification
Machine Learning and Data Mining: 10 Introduction to Classification
 
RR and Rx.pptx
RR and Rx.pptxRR and Rx.pptx
RR and Rx.pptx
 
MUGABI ON ASTIGMATISM.pptx
MUGABI ON ASTIGMATISM.pptxMUGABI ON ASTIGMATISM.pptx
MUGABI ON ASTIGMATISM.pptx
 
NAVP Treatment of Amblyopia
NAVP Treatment of AmblyopiaNAVP Treatment of Amblyopia
NAVP Treatment of Amblyopia
 
Eyeglass prescribing in children 2024 SLMC.pdf
Eyeglass prescribing in children 2024 SLMC.pdfEyeglass prescribing in children 2024 SLMC.pdf
Eyeglass prescribing in children 2024 SLMC.pdf
 
Lecture 03 Data Representation
Lecture 03 Data RepresentationLecture 03 Data Representation
Lecture 03 Data Representation
 
Challenging Refraction
Challenging RefractionChallenging Refraction
Challenging Refraction
 
Glasses prescription clinical tips.pptx
Glasses prescription clinical tips.pptxGlasses prescription clinical tips.pptx
Glasses prescription clinical tips.pptx
 
Passive Therapy in Management of Amblyopia (healthkura.com)
Passive Therapy in Management of Amblyopia (healthkura.com)Passive Therapy in Management of Amblyopia (healthkura.com)
Passive Therapy in Management of Amblyopia (healthkura.com)
 
tips in prescribing children glasses.pptx
tips in prescribing children glasses.pptxtips in prescribing children glasses.pptx
tips in prescribing children glasses.pptx
 
How to Prescribe Eyeglasses in Children recap
How to Prescribe Eyeglasses in Children recapHow to Prescribe Eyeglasses in Children recap
How to Prescribe Eyeglasses in Children recap
 
Prescription of glasses in children
Prescription of glasses in childrenPrescription of glasses in children
Prescription of glasses in children
 
mod_02_intro_ml.ppt
mod_02_intro_ml.pptmod_02_intro_ml.ppt
mod_02_intro_ml.ppt
 
Real Refractive error and spectacle correction.ppt
Real Refractive error and spectacle correction.pptReal Refractive error and spectacle correction.ppt
Real Refractive error and spectacle correction.ppt
 
Prescription for ametropias
Prescription for ametropiasPrescription for ametropias
Prescription for ametropias
 
Part XIV
Part XIVPart XIV
Part XIV
 

More from Tilani Gunawardena PhD(UNIBAS), BSc(Pera), FHEA(UK), CEng, MIESL

More from Tilani Gunawardena PhD(UNIBAS), BSc(Pera), FHEA(UK), CEng, MIESL (20)

BlockChain.pptx
BlockChain.pptxBlockChain.pptx
BlockChain.pptx
 
Introduction to data mining and machine learning
Introduction to data mining and machine learningIntroduction to data mining and machine learning
Introduction to data mining and machine learning
 
Introduction to cloud computing
Introduction to cloud computingIntroduction to cloud computing
Introduction to cloud computing
 
Data analytics
Data analyticsData analytics
Data analytics
 
Hadoop Eco system
Hadoop Eco systemHadoop Eco system
Hadoop Eco system
 
Parallel Computing on the GPU
Parallel Computing on the GPUParallel Computing on the GPU
Parallel Computing on the GPU
 
evaluation and credibility-Part 2
evaluation and credibility-Part 2evaluation and credibility-Part 2
evaluation and credibility-Part 2
 
evaluation and credibility-Part 1
evaluation and credibility-Part 1evaluation and credibility-Part 1
evaluation and credibility-Part 1
 
Machine Learning and Data Mining
Machine Learning and Data MiningMachine Learning and Data Mining
Machine Learning and Data Mining
 
K Nearest Neighbors
K Nearest NeighborsK Nearest Neighbors
K Nearest Neighbors
 
Decision tree
Decision treeDecision tree
Decision tree
 
kmean clustering
kmean clusteringkmean clustering
kmean clustering
 
Hierachical clustering
Hierachical clusteringHierachical clustering
Hierachical clustering
 
Assosiate rule mining
Assosiate rule miningAssosiate rule mining
Assosiate rule mining
 
Big data in telecom
Big data in telecomBig data in telecom
Big data in telecom
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
MapReduce
MapReduceMapReduce
MapReduce
 
Cheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduceCheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduce
 
Pig Experience
Pig ExperiencePig Experience
Pig Experience
 
Interpreting the Data:Parallel Analysis with Sawzall
Interpreting the Data:Parallel Analysis with SawzallInterpreting the Data:Parallel Analysis with Sawzall
Interpreting the Data:Parallel Analysis with Sawzall
 

Recently uploaded

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 

Covering algorithm

  • 2. Example: generating a rule • Possible rule set for class “a” • If x > 1.2 then class = a • If x > 1.2 and y > 2.6 then class = a • Possible rule set for class “b”: • If x ≤ 1.2 then class = b • If x > 1.2 and y ≤ 2.6 then class = b • Could add more rules, get “perfect” rule set
  • 3. • Corresponding decision tree: (produces exactly the same predictions) • But: rule sets can be more perspicuous when decision trees suffer from replicated subtrees • Also: in multiclass situations, covering algorithm concentrates on one class at a time whereas decision tree learner takes all classes into account Rules vs Trees
  • 4. • Generates a rule by adding tests that maximize rule’s accuracy • Similar to situation in decision trees: problem of selecting an attribute to split on • Each new test reduces rule’s coverage: Simple covering algorithm
  • 5. • Convert decision tree into a rule set – Straightforward, but rule set overly complex – More effective conversions are not trivial • Instead, can generate rule set directly – for each class in turn find rule set that covers all instances in it (excluding instances not in the class) • Called a covering approach: – at each stage a rule is identified that “covers” some of the instances Covering Algorithms
  • 6. Selecting a test • Goal: maximize accuracy – t total number of instances covered by rule – p positive examples of the class covered by rule – t – p number of errors made by rule  Select test that maximizes the ratio p/t • We are finished when p/t = 1 or the set of instances can’t be split any further
  • 7. Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope No Reduced None Young Myope No Normal Soft Young Myope Yes Reduced None Young Myope Yes Normal Hard Young Hypermetrope No Reduced None Young Hypermetrope No Normal Soft Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal Hard Pre-presbyopic Myope No Reduced None Pre-presbyopic Myope No Normal Soft Pre-presbyopic Myope Yes Reduced None Pre-presbyopic Myope Yes Normal Hard Pre-presbyopic Hypermetrope No Reduced None Pre-presbyopic Hypermetrope No Normal Soft Pre-presbyopic Hypermetrope Yes Reduced None Pre-presbyopic Hypermetrope Yes Normal None Presbyopic Myope No Reduced None Presbyopic Myope No Normal None Presbyopic Myope Yes Reduced None Presbyopic Myope Yes Normal Hard Presbyopic Hypermetrope No Reduced None Presbyopic Hypermetrope No Normal Soft Presbyopic Hypermetrope Yes Reduced None Presbyopic Hypermetrope Yes Normal None
  • 8. Example: Contact lens data • Rule we seek: • Possible tests: Age = Young Age = Pre-presbyopic Age = Presbyopic Spectacle prescription = Myope Spectacle prescription = Hypermetrope Astigmatism = no Astigmatism = yes Tear production rate = Reduced Tear production rate = Normal If ? then recommendation = hard
  • 9. Example: Contact lens data • Rule we seek: • Possible tests: Age = Young 2/8 Age = Pre-presbyopic 1/8 Age = Presbyopic 1/8 Spectacle prescription = Myope 3/12 Spectacle prescription = Hypermetrope 1/12 Astigmatism = no 0/12 Astigmatism = yes 4/12 Tear production rate = Reduced 0/12 Tear production rate = Normal 4/12 If ? then recommendation = hard
  • 10. Modified rule and resulting data • Rule with best test added: • Instances covered by modified rule: Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope Yes Reduced None Young Myope Yes Normal Hard Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal hard Pre-presbyopic Myope Yes Reduced None Pre-presbyopic Myope Yes Normal Hard Pre-presbyopic Hypermetrope Yes Reduced None Pre-presbyopic Hypermetrope Yes Normal None Presbyopic Myope Yes Reduced None Presbyopic Myope Yes Normal Hard Presbyopic Hypermetrope Yes Reduced None Presbyopic Hypermetrope Yes Normal None If astigmatism = yes then recommendation = hard
  • 11. Further refinement • Current state: • Possible tests: Age = Young Age = Pre-presbyopic Age = Presbyopic Spectacle prescription = Myope Spectacle prescription = Hypermetrope Tear production rate = Reduced Tear production rate = Normal If astigmatism = yes and ? then recommendation = hard
  • 12. Further refinement • Current state: • Possible tests: Age = Young 2/4 Age = Pre-presbyopic 1/4 Age = Presbyopic 1/4 Spectacle prescription = Myope 3/6 Spectacle prescription = Hypermetrope 1/6 Tear production rate = Reduced 0/6 Tear production rate = Normal 4/6 If astigmatism = yes and ? then recommendation = hard
  • 13. Modified rule and resulting data • Rule with best test added: • Instances covered by modified rule: Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope Yes Normal Hard Young Hypermetrope Yes Normal hard Pre-presbyopic Myope Yes Normal Hard Pre-presbyopic Hypermetrope Yes Normal None Presbyopic Myope Yes Normal Hard Presbyopic Hypermetrope Yes Normal None If astigmatism = yes and tear production rate = normal then recommendation = hard
  • 14. Further refinement • Current state: • Possible tests: • Tie between the first and the fourth test – We choose the one with greater coverage Age = Young 2/2 Age = Pre-presbyopic 1/2 Age = Presbyopic 1/2 Spectacle prescription = Myope 3/3 Spectacle prescription = Hypermetrope 1/3 If astigmatism = yes and tear production rate = normal and ? then recommendation = hard
  • 15. The result • Final rule: • Second rule for recommending “hard lenses”: (built from instances not covered by first rule) If astigmatism = yes and tear production rate = normal and spectacle prescription = myope then recommendation = hard
  • 16. Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope No Reduced None Young Myope No Normal Soft Young Myope Yes Reduced None Young Myope Yes Normal Hard Young Hypermetrope No Reduced None Young Hypermetrope No Normal Soft Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal Hard Pre-presbyopic Myope No Reduced None Pre-presbyopic Myope No Normal Soft Pre-presbyopic Myope Yes Reduced None Pre-presbyopic Myope Yes Normal Hard Pre-presbyopic Hypermetrope No Reduced None Pre-presbyopic Hypermetrope No Normal Soft Pre-presbyopic Hypermetrope Yes Reduced None Pre-presbyopic Hypermetrope Yes Normal None Presbyopic Myope No Reduced None Presbyopic Myope No Normal None Presbyopic Myope Yes Reduced None Presbyopic Myope Yes Normal Hard Presbyopic Hypermetrope No Reduced None Presbyopic Hypermetrope No Normal Soft Presbyopic Hypermetrope Yes Reduced None Presbyopic Hypermetrope Yes Normal None
  • 17. Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope No Reduced None Young Myope No Normal Soft Young Myope Yes Reduced None Young Myope Yes Normal Hard Young Hypermetrope No Reduced None Young Hypermetrope No Normal Soft Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal Hard Pre-presbyopic Myope No Reduced None Pre-presbyopic Myope No Normal Soft Pre-presbyopic Myope Yes Reduced None Pre-presbyopic Myope Yes Normal Hard Pre-presbyopic Hypermetrope No Reduced None Pre-presbyopic Hypermetrope No Normal Soft Pre-presbyopic Hypermetrope Yes Reduced None Pre-presbyopic Hypermetrope Yes Normal None Presbyopic Myope No Reduced None Presbyopic Myope No Normal None Presbyopic Myope Yes Reduced None Presbyopic Myope Yes Normal Hard Presbyopic Hypermetrope No Reduced None Presbyopic Hypermetrope No Normal Soft Presbyopic Hypermetrope Yes Reduced None Presbyopic Hypermetrope Yes Normal None
  • 18. Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope No Reduced None Young Myope No Normal Soft Young Myope Yes Reduced None Young Hypermetrope No Reduced None Young Hypermetrope No Normal Soft Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal Hard Pre-presbyopic Myope No Reduced None Pre-presbyopic Myope No Normal Soft Pre-presbyopic Myope Yes Reduced None Pre-presbyopic Hypermetrope No Reduced None Pre-presbyopic Hypermetrope No Normal Soft Pre-presbyopic Hypermetrope Yes Reduced None Pre-presbyopic Hypermetrope Yes Normal None Presbyopic Myope No Reduced None Presbyopic Myope No Normal None Presbyopic Myope Yes Reduced None Presbyopic Hypermetrope No Reduced None Presbyopic Hypermetrope No Normal Soft Presbyopic Hypermetrope Yes Reduced None Presbyopic Hypermetrope Yes Normal None
  • 19. Example: Contact lens data • Rule we seek: • Possible tests: Age = Young Age = Pre-presbyopic Age = Presbyopic Spectacle prescription = Myope Spectacle prescription = Hypermetrope Astigmatism = no Astigmatism = yes Tear production rate = Reduced Tear production rate = Normal If ? then recommendation = hard
  • 20. Example: Contact lens data • Rule we seek: • Possible tests: Age = Young 1/7 Age = Pre-presbyopic 0/7 Age = Presbyopic 0/7 Spectacle prescription = Myope 0/9 Spectacle prescription = Hypermetrope 1/12 Astigmatism = no 0/12 Astigmatism = yes 1/9 Tear production rate = Reduced 0/12 Tear production rate = Normal 1/9 If ? then recommendation = hard
  • 21. Modified rule and resulting data • Rule with best test added: • Instances covered by modified rule: If age = Young then recommendation = hard Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope No Reduced None Young Myope No Normal Soft Young Myope Yes Reduced None Young Hypermetrope No Reduced None Young Hypermetrope No Normal Soft Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal Hard
  • 22. Further refinement • Current state: • Possible tests: If age = Young and ? then recommendation = hard Spectacle prescription = Myope Spectacle prescription = Hypermetrope Astigmatism = no Astigmatism = yes Tear production rate = Reduced Tear production rate = Normal
  • 23. Further refinement • Current state: • Possible tests: If age = Young and ? then recommendation = hard Spectacle prescription = Myope 0/3 Spectacle prescription = Hypermetrope 1/4 Astigmatism = no 0/4 Astigmatism = yes 1/3 Tear production rate = Reduced 0/4 Tear production rate = Normal 1/3
  • 24. Modified rule and resulting data • Rule with best test added: • Instances covered by modified rule: If age = Young and Astigmatism = yes then recommendation = hard Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope Yes Reduced None Young Hypermetrope Yes Reduced None Young Hypermetrope Yes Normal Hard
  • 25. Further refinement • Current state: • Possible tests: Spectacle prescription = Myope Spectacle prescription = Hypermetrope Tear production rate = Reduced Tear production rate = Normal If age = Young and Astigmatism = yes and ? then recommendation = hard
  • 26. Further refinement • Current state: • Possible tests: Spectacle prescription = Myope 0/1 Spectacle prescription = Hypermetrope 1/2 Tear production rate = Reduced 0/2 Tear production rate = Normal 1/1 If age = Young and Astigmatism = yes and ? then recommendation = hard
  • 27. Final Results If age = Young and astigmatism = yes and tear production rate=normal then recommendation = hard Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope Yes Normal Hard Young Hypermetrope Yes Normal Hard If astigmatism = yes and tear production rate = normal and spectacle prescription = myope then recommendation = hard Age Spectacle prescription Astigmatism Tear production rate Recommended lenses Young Myope Yes Normal Hard Pre-presbyopic Myope Yes Normal Hard Presbyopic Myope Yes Normal Hard
  • 28. Pseudo-code for PRISM For each class C Initialize E to the instance set While E contains instances in class C Create a rule R with an empty left-hand side that predicts class C Until R is perfect (or there are no more attributes to use) do For each attribute A not mentioned in R, and each value v, Consider adding the condition A = v to the left-hand side of R Select A and v to maximize the accuracy p/t (break ties by choosing the condition with the largest p) Add A = v to R Remove the instances covered by R from E
  • 29. • PRISM with outer loop removed generates a decision list for one class – Subsequent rules are designed for rules that are not covered by previous rules – Order doesn’t matter because all rules predict the same class • Outer loop considers all classes separately – No order dependence implied
  • 30. Separate and conquer • Methods like PRISM (for dealing with one class) are separate-and-conquer algorithms: – First, a rule is identified – Then, all instances covered by the rule are separated out – Finally, the remaining instances are “conquered” • Difference to divide-and-conquer methods: – Subset covered by rule doesn’t need to be explored any further