SlideShare a Scribd company logo
1 of 5
Prof. Neeraj Bhargava
Vishal Dutt
Department of Computer Science, School of
Engineering & System Sciences
MDS University, Ajmer
CART and Linear Structure
FREQ1_F_RPT <= 0.500
Terminal
Node 1
Class = 0
Class Cases %
0 18984 78.7
1 5138 21.3
N = 24122
FREQ1_F_RPT > 0.500
Terminal
Node 2
Class = 1
Class Cases %
0 2508 57.4
1 1859 42.6
N = 4367
LIAB_ONLY <= 0.500
Node 3
FREQ1_F_RPT
N = 28489
LIAB_ONLY > 0.500
Terminal
Node 3
Class = 0
Class Cases %
0 7591 96.5
1 279 3.5
N = 7870
NUM_VEH <= 4.500
Node 2
LIAB_ONLY
N = 36359
AVGAGE_CAT <= 8.500
Terminal
Node 4
Class = 1
Class Cases %
0 4327 48.1
1 4671 51.9
N = 8998
AVGAGE_CAT > 8.500
Terminal
Node 5
Class = 0
Class Cases %
0 2072 76.5
1 637 23.5
N = 2709
NUM_VEH <= 10.500
Node 5
AVGAGE_CAT
N = 11707
NUM_VEH > 10.500
Terminal
Node 6
Class = 1
Class Cases %
0 2409 26.4
1 6728 73.6
N = 9137
NUM_VEH > 4.500
Node 4
NUM_VEH
N = 20844
Node 1
NUM_VEH
N = 57203
 Notice Right-hand side of
the tree...
 CART is struggling to
capture a linear
relationship
 Weakness of CART
 The best CART can do is a
step function
approximation of a linear
relationship.
Interactions and Rules
 This tree is obviously not the
best way to model this
dataset.
 But notice node #3
 Liability-only policies with
fewer than 5 vehicles have a
very low claim frequency in
this data.
 Could be used as an
underwriting rule
 Or an interaction term in a
GLM
FREQ1_F_RPT <= 0.500
Terminal
Node 1
Class = 0
Class Cases %
0 18984 78.7
1 5138 21.3
N = 24122
FREQ1_F_RPT > 0.500
Terminal
Node 2
Class = 1
Class Cases %
0 2508 57.4
1 1859 42.6
N = 4367
LIAB_ONLY <= 0.500
Node 3
FREQ1_F_RPT
N = 28489
LIAB_ONLY > 0.500
Terminal
Node 3
Class = 0
Class Cases %
0 7591 96.5
1 279 3.5
N = 7870
NUM_VEH <= 4.500
Node 2
LIAB_ONLY
N = 36359
AVGAGE_CAT <= 8.500
Terminal
Node 4
Class = 1
Class Cases %
0 4327 48.1
1 4671 51.9
N = 8998
AVGAGE_CAT > 8.500
Terminal
Node 5
Class = 0
Class Cases %
0 2072 76.5
1 637 23.5
N = 2709
NUM_VEH <= 10.500
Node 5
AVGAGE_CAT
N = 11707
NUM_VEH > 10.500
Terminal
Node 6
Class = 1
Class Cases %
0 2409 26.4
1 6728 73.6
N = 9137
NUM_VEH > 4.500
Node 4
NUM_VEH
N = 20844
Node 1
NUM_VEH
N = 57203
High-Dimensional Predictors
 Categorical predictors: CART
considers every possible subset
of categories
 Nice feature
 Very handy way to group
massively categorical predictors
into a small # of groups
 Left (fewer claims):
dump, farm, no truck
 Right (more claims): contractor,
hauling, food delivery, special
delivery, waste, other
= ("dump",...)
Terminal
Node 1
N = 11641
= ("hauling")
Terminal
Node 2
N = 652
= ("specDel")
Terminal
Node 3
N = 249
= ("hauling",...)
Node 3
LINE_IND$
N = 901
= ("contr",...)
Terminal
Node 4
N = 25758
= ("contr",...)
Node 2
LINE_IND$
N = 26659
Node 1
LINE_IND$
N = 38300
Gains Chart: Measuring Success
From left to right:
 Node 6: 16% of policies, 35% of
claims.
 Node 4: add’l 16% of policies,
24% of claims.
 Node 2: add’l 8% of policies,
10% of claims.
 ..etc.
 The steeper the gains chart, the
stronger the model.
 Analogous to a lift curve.
 Desirable to use out-of-sample
data.

More Related Content

More from Vishal Dutt

Python decision making_loops_control statements part9
Python decision making_loops_control statements part9Python decision making_loops_control statements part9
Python decision making_loops_control statements part9Vishal Dutt
 
Python decision making_loops_control statements part8
Python decision making_loops_control statements part8Python decision making_loops_control statements part8
Python decision making_loops_control statements part8Vishal Dutt
 
Python decision making_loops part7
Python decision making_loops part7Python decision making_loops part7
Python decision making_loops part7Vishal Dutt
 
Python decision making_loops part6
Python decision making_loops part6Python decision making_loops part6
Python decision making_loops part6Vishal Dutt
 
Python decision making part5
Python decision making part5Python decision making part5
Python decision making part5Vishal Dutt
 
Python decision making part4
Python decision making part4Python decision making part4
Python decision making part4Vishal Dutt
 
Python operators part3
Python operators part3Python operators part3
Python operators part3Vishal Dutt
 
Python operators part2
Python operators part2Python operators part2
Python operators part2Vishal Dutt
 

More from Vishal Dutt (20)

List view5
List view5List view5
List view5
 
Python decision making_loops_control statements part9
Python decision making_loops_control statements part9Python decision making_loops_control statements part9
Python decision making_loops_control statements part9
 
List view4
List view4List view4
List view4
 
List view3
List view3List view3
List view3
 
Python decision making_loops_control statements part8
Python decision making_loops_control statements part8Python decision making_loops_control statements part8
Python decision making_loops_control statements part8
 
Python decision making_loops part7
Python decision making_loops part7Python decision making_loops part7
Python decision making_loops part7
 
Python decision making_loops part6
Python decision making_loops part6Python decision making_loops part6
Python decision making_loops part6
 
List view2
List view2List view2
List view2
 
List view1
List view1List view1
List view1
 
Python decision making part5
Python decision making part5Python decision making part5
Python decision making part5
 
Python decision making part4
Python decision making part4Python decision making part4
Python decision making part4
 
Python operators part3
Python operators part3Python operators part3
Python operators part3
 
Python operators part2
Python operators part2Python operators part2
Python operators part2
 
Python part1
Python part1Python part1
Python part1
 
22 FP Tree
22 FP Tree22 FP Tree
22 FP Tree
 
21 FP Tree
21 FP Tree21 FP Tree
21 FP Tree
 
20 Simple CART
20 Simple CART20 Simple CART
20 Simple CART
 
19 Simple CART
19 Simple CART19 Simple CART
19 Simple CART
 
18 Simple CART
18 Simple CART18 Simple CART
18 Simple CART
 
17 Simple CART
17 Simple CART17 Simple CART
17 Simple CART
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

15 Simple CART

  • 1. Prof. Neeraj Bhargava Vishal Dutt Department of Computer Science, School of Engineering & System Sciences MDS University, Ajmer
  • 2. CART and Linear Structure FREQ1_F_RPT <= 0.500 Terminal Node 1 Class = 0 Class Cases % 0 18984 78.7 1 5138 21.3 N = 24122 FREQ1_F_RPT > 0.500 Terminal Node 2 Class = 1 Class Cases % 0 2508 57.4 1 1859 42.6 N = 4367 LIAB_ONLY <= 0.500 Node 3 FREQ1_F_RPT N = 28489 LIAB_ONLY > 0.500 Terminal Node 3 Class = 0 Class Cases % 0 7591 96.5 1 279 3.5 N = 7870 NUM_VEH <= 4.500 Node 2 LIAB_ONLY N = 36359 AVGAGE_CAT <= 8.500 Terminal Node 4 Class = 1 Class Cases % 0 4327 48.1 1 4671 51.9 N = 8998 AVGAGE_CAT > 8.500 Terminal Node 5 Class = 0 Class Cases % 0 2072 76.5 1 637 23.5 N = 2709 NUM_VEH <= 10.500 Node 5 AVGAGE_CAT N = 11707 NUM_VEH > 10.500 Terminal Node 6 Class = 1 Class Cases % 0 2409 26.4 1 6728 73.6 N = 9137 NUM_VEH > 4.500 Node 4 NUM_VEH N = 20844 Node 1 NUM_VEH N = 57203  Notice Right-hand side of the tree...  CART is struggling to capture a linear relationship  Weakness of CART  The best CART can do is a step function approximation of a linear relationship.
  • 3. Interactions and Rules  This tree is obviously not the best way to model this dataset.  But notice node #3  Liability-only policies with fewer than 5 vehicles have a very low claim frequency in this data.  Could be used as an underwriting rule  Or an interaction term in a GLM FREQ1_F_RPT <= 0.500 Terminal Node 1 Class = 0 Class Cases % 0 18984 78.7 1 5138 21.3 N = 24122 FREQ1_F_RPT > 0.500 Terminal Node 2 Class = 1 Class Cases % 0 2508 57.4 1 1859 42.6 N = 4367 LIAB_ONLY <= 0.500 Node 3 FREQ1_F_RPT N = 28489 LIAB_ONLY > 0.500 Terminal Node 3 Class = 0 Class Cases % 0 7591 96.5 1 279 3.5 N = 7870 NUM_VEH <= 4.500 Node 2 LIAB_ONLY N = 36359 AVGAGE_CAT <= 8.500 Terminal Node 4 Class = 1 Class Cases % 0 4327 48.1 1 4671 51.9 N = 8998 AVGAGE_CAT > 8.500 Terminal Node 5 Class = 0 Class Cases % 0 2072 76.5 1 637 23.5 N = 2709 NUM_VEH <= 10.500 Node 5 AVGAGE_CAT N = 11707 NUM_VEH > 10.500 Terminal Node 6 Class = 1 Class Cases % 0 2409 26.4 1 6728 73.6 N = 9137 NUM_VEH > 4.500 Node 4 NUM_VEH N = 20844 Node 1 NUM_VEH N = 57203
  • 4. High-Dimensional Predictors  Categorical predictors: CART considers every possible subset of categories  Nice feature  Very handy way to group massively categorical predictors into a small # of groups  Left (fewer claims): dump, farm, no truck  Right (more claims): contractor, hauling, food delivery, special delivery, waste, other = ("dump",...) Terminal Node 1 N = 11641 = ("hauling") Terminal Node 2 N = 652 = ("specDel") Terminal Node 3 N = 249 = ("hauling",...) Node 3 LINE_IND$ N = 901 = ("contr",...) Terminal Node 4 N = 25758 = ("contr",...) Node 2 LINE_IND$ N = 26659 Node 1 LINE_IND$ N = 38300
  • 5. Gains Chart: Measuring Success From left to right:  Node 6: 16% of policies, 35% of claims.  Node 4: add’l 16% of policies, 24% of claims.  Node 2: add’l 8% of policies, 10% of claims.  ..etc.  The steeper the gains chart, the stronger the model.  Analogous to a lift curve.  Desirable to use out-of-sample data.

Editor's Notes

  1. 2
  2. 3
  3. 4
  4. 5