SlideShare a Scribd company logo
1 of 10
RegressionTrees
Hno lot Income Class Class
1 18.4 60 0 Owner
2 16.8 85.5 0 Owner
3 21.6 64.8 0 Owner
4 20.8 61.5 0 Owner
5 23.6 87 0 Owner
6 19.2 110.1 0 Owner
7 17.6 108 0 Owner
8 22.4 82.8 0 Owner
9 20 69 0 Owner
10 20.8 93 0 Owner
11 22 51 0 Owner
12 20 81 0 Owner
13 19.6 75 1 Non Owner
14 20.8 52.8 1 Non Owner
15 17.2 64.8 1 Non Owner
16 20.4 43.2 1 Non Owner
17 17.6 84 1 Non Owner
18 17.6 49.2 1 Non Owner
19 16 59.4 1 Non Owner
20 18.4 66 1 Non Owner
21 16.4 47.4 1 Non Owner
22 18.8 33 1 Non Owner
23 14 51 1 Non Owner
24 14.8 63 1 Non Owner
Median 19 64.8
Scatterplot of Lot Size vs. Income for 24 owners and non-owners of riding mowers
Gini Index (Class) = (1 − ∑ 𝑝𝑖
2
𝑛
𝑖=1 )
Non Owner=12
Owner=12
Gini (class) = (1-(12/24)2+(12/24)2) = 0
Median of lot = 19
Splitting the 24 observations by Lot Size value of 19 approximately
Lot <=19 (Lower Rectangle)
lot Income Class Class
14 51 1 Non Owner
14.8 63 1 Non Owner
16 59.4 1 Non Owner
16.4 47.4 1 Non Owner
16.8 85.5 0 Owner
17.2 64.8 1 Non Owner
17.6 108 0 Owner
17.6 84 1 Non Owner
17.6 49.2 1 Non Owner
18.4 60 0 Owner
18.4 66 1 Non Owner
18.8 33 1 Non Owner
Gini(lot - LR) = (1 – (3/12)2 – (9/12)2) = 0.375
Lot>19 (Upper Rectangle)
lot Income Class Class
19.2 110.1 0 Owner
19.6 75 1 Non Owner
20 69 0 Owner
20 81 0 Owner
20.4 43.2 1 Non Owner
20.8 61.5 0 Owner
20.8 93 0 Owner
20.8 52.8 1 Non Owner
21.6 64.8 0 Owner
22 51 0 Owner
22.4 82.8 0 Owner
23.6 87 0 Owner
Gini(lot - UR) = (1 – (9/12)2 – (3/12)2) = 0.375
Avg of LR and UR = 12/24(0.375)+12/24(0.375) = 0.375
Median(Income) = 64.8
Income<=64.8 (Lower Rectangle)
lot Income Class Class
18.8 33 1 Non Owner
20.4 43.2 1 Non Owner
16.4 47.4 1 Non Owner
17.6 49.2 1 Non Owner
22 51 0 Owner
14 51 1 Non Owner
20.8 52.8 1 Non Owner
16 59.4 1 Non Owner
18.4 60 0 Owner
20.8 61.5 0 Owner
14.8 63 1 Non Owner
21.6 64.8 0 Owner
17.2 64.8 1 Non Owner
Gini(Income) = (1 – (4/13)2 – (9/13)2) = 0.4261
Income>64.8 (Upper Rectangle)
lot Income Class Class
18.4 66 1 Non Owner
20 69 0 Owner
19.6 75 1 Non Owner
20 81 0 Owner
22.4 82.8 0 Owner
17.6 84 1 Non Owner
16.8 85.5 0 Owner
23.6 87 0 Owner
20.8 93 0 Owner
17.6 108 0 Owner
19.2 110.1 0 Owner
Gini(Income) = (1 – (8/11)2 – (3/11)2) = 0.3967
Avg of LR and UR = 14/24(0.4261)+11/24(0.397) = 0.431
Lot Income
0.375 (Min) 0.431
Minimum Gini Avg is for Lot. So choose lot as root
Tree: Step 1 – Identifying the root
Sort Lower rectangle of Lot <=19 with respect to Income and try analysing the class and
finalize the income points after which the classes has never changed. Its 84 and 85.5.
Median(84, 85.5) = 84.75
Lot
19
12 12
LR of Lot<=19
lot Income Class Class
18.8 33 1 Non Owner
16.4 47.4 1 Non Owner
17.6 49.2 1 Non Owner
14 51 1 Non Owner
16 59.4 1 Non Owner
18.4 60 0 Owner
14.8 63 1 Non Owner
17.2 64.8 1 Non Owner
18.4 66 1 Non Owner
17.6 84 1 Non Owner
16.8 85.5 0 Owner
17.6 108 0 Owner
If we continue splitting the mower data, the next split is on the Income variable at the value
84.75.
Splitting the 24 observations by Lot Size value of 19K, and then Income value of 84.75K
LR of Lot<=19 and Income <=84.75
lot Income Class Class
18.8 33 1 Non Owner
16.4 47.4 1 Non Owner
17.6 49.2 1 Non Owner
14 51 1 Non Owner
16 59.4 1 Non Owner
18.4 60 0 Owner
14.8 63 1 Non Owner
17.2 64.8 1 Non Owner
18.4 66 1 Non Owner
17.6 84 1 Non Owner
LR of Lot<=19 and Income >84.75
lot Income Class Class
16.8 85.5 0 Owner
17.6 108 0 Owner
Sort Lower rectangle of Lot <=19, Income <=84.75 with respect to the class and finalize the
lot points after which the classes has never changed. Its 17.6 and 18.4.
Median(17.6,18.4) = 18
LR of Lot<=19, Income <=84.75, Lot <=18
lot Income Class Class
14 51 1 Non Owner
14.8 63 1 Non Owner
16 59.4 1 Non Owner
16.4 47.4 1 Non Owner
17.2 64.8 1 Non Owner
17.6 49.2 1 Non Owner
17.6 84 1 Non Owner
2
Lot
19
12 12
Income
84.75
Owner
10
LR of Lot<=19, Income <=84.75, Lot >18
lot Income Class Class
18.4 66 1 Non Owner
18.4 60 0 Owner
18.8 33 1 Non Owner
Sort Lower rectangle of Lot <=19, Income <=84.75, Lot>18 with respect to the class and
finalize the lot points after which the classes has never changed. Its 18.8 and 18.4.
Median(18.8,18.4) = 18.6
LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6
lot Income Class Class
18.4 66 1 Non Owner
18.4 60 0 Owner
LR of Lot<=19, Income <=84.75, Lot >18, Lot>18.6
lot Income Class Class
18.8 33 1 Non Owner
2
Lot
19
12 12
Income
84.75
Owner
10
Lot
18
7
Non
Owner
3
LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6
lot Income Class Class
18.4 66 1 Non Owner
18.4 60 0 Owner
Sort Lower rectangle of Lot <=19, Income <=84.75, Lot>18, Lot<=18.6 with respect to the
class and finalize the income points after which the classes has never changed. Its 60 and 66
Median(66,60) = 63
LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6, Income<=63
lot Income Class Class
18.4 60 0 Owner
LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6, Income>63
lot Income Class Class
18.4 66 1 Non Owner
2
Lot
19
12 12
Income
84.75
Owner
10
Lot
18
7
Non
Owner
3
Lot
18.6
1
Non
Owner
2
Final Left Regression Tree
Predict Income = 55 Lot = 18.5
Income
63
2
Lot
19
12 12
Income
84.75
Owner
10
Lot
18
7
Non
Owner
3
Lot
18.6
1
Non
Owner
2
1
1
Owner Non
Owner
Predict Income = 55 Lot = 18.5
Income
46.5
2
Lot
19
12 12
Income
84.75
Owner
10
Lot
18
7
Non
Owner
3
Income
63
1
Non
Owner
1
1
Non
Owner Owner

More Related Content

Recently uploaded

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Recently uploaded (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Regression trees

  • 1. RegressionTrees Hno lot Income Class Class 1 18.4 60 0 Owner 2 16.8 85.5 0 Owner 3 21.6 64.8 0 Owner 4 20.8 61.5 0 Owner 5 23.6 87 0 Owner 6 19.2 110.1 0 Owner 7 17.6 108 0 Owner 8 22.4 82.8 0 Owner 9 20 69 0 Owner 10 20.8 93 0 Owner 11 22 51 0 Owner 12 20 81 0 Owner 13 19.6 75 1 Non Owner 14 20.8 52.8 1 Non Owner 15 17.2 64.8 1 Non Owner 16 20.4 43.2 1 Non Owner 17 17.6 84 1 Non Owner 18 17.6 49.2 1 Non Owner 19 16 59.4 1 Non Owner 20 18.4 66 1 Non Owner 21 16.4 47.4 1 Non Owner 22 18.8 33 1 Non Owner 23 14 51 1 Non Owner 24 14.8 63 1 Non Owner Median 19 64.8 Scatterplot of Lot Size vs. Income for 24 owners and non-owners of riding mowers
  • 2. Gini Index (Class) = (1 − ∑ 𝑝𝑖 2 𝑛 𝑖=1 ) Non Owner=12 Owner=12 Gini (class) = (1-(12/24)2+(12/24)2) = 0 Median of lot = 19 Splitting the 24 observations by Lot Size value of 19 approximately Lot <=19 (Lower Rectangle) lot Income Class Class 14 51 1 Non Owner 14.8 63 1 Non Owner 16 59.4 1 Non Owner 16.4 47.4 1 Non Owner 16.8 85.5 0 Owner 17.2 64.8 1 Non Owner 17.6 108 0 Owner 17.6 84 1 Non Owner 17.6 49.2 1 Non Owner 18.4 60 0 Owner 18.4 66 1 Non Owner 18.8 33 1 Non Owner Gini(lot - LR) = (1 – (3/12)2 – (9/12)2) = 0.375
  • 3. Lot>19 (Upper Rectangle) lot Income Class Class 19.2 110.1 0 Owner 19.6 75 1 Non Owner 20 69 0 Owner 20 81 0 Owner 20.4 43.2 1 Non Owner 20.8 61.5 0 Owner 20.8 93 0 Owner 20.8 52.8 1 Non Owner 21.6 64.8 0 Owner 22 51 0 Owner 22.4 82.8 0 Owner 23.6 87 0 Owner Gini(lot - UR) = (1 – (9/12)2 – (3/12)2) = 0.375 Avg of LR and UR = 12/24(0.375)+12/24(0.375) = 0.375 Median(Income) = 64.8 Income<=64.8 (Lower Rectangle) lot Income Class Class 18.8 33 1 Non Owner 20.4 43.2 1 Non Owner 16.4 47.4 1 Non Owner 17.6 49.2 1 Non Owner 22 51 0 Owner 14 51 1 Non Owner 20.8 52.8 1 Non Owner 16 59.4 1 Non Owner 18.4 60 0 Owner 20.8 61.5 0 Owner 14.8 63 1 Non Owner 21.6 64.8 0 Owner 17.2 64.8 1 Non Owner Gini(Income) = (1 – (4/13)2 – (9/13)2) = 0.4261
  • 4. Income>64.8 (Upper Rectangle) lot Income Class Class 18.4 66 1 Non Owner 20 69 0 Owner 19.6 75 1 Non Owner 20 81 0 Owner 22.4 82.8 0 Owner 17.6 84 1 Non Owner 16.8 85.5 0 Owner 23.6 87 0 Owner 20.8 93 0 Owner 17.6 108 0 Owner 19.2 110.1 0 Owner Gini(Income) = (1 – (8/11)2 – (3/11)2) = 0.3967 Avg of LR and UR = 14/24(0.4261)+11/24(0.397) = 0.431 Lot Income 0.375 (Min) 0.431 Minimum Gini Avg is for Lot. So choose lot as root Tree: Step 1 – Identifying the root Sort Lower rectangle of Lot <=19 with respect to Income and try analysing the class and finalize the income points after which the classes has never changed. Its 84 and 85.5. Median(84, 85.5) = 84.75 Lot 19 12 12
  • 5. LR of Lot<=19 lot Income Class Class 18.8 33 1 Non Owner 16.4 47.4 1 Non Owner 17.6 49.2 1 Non Owner 14 51 1 Non Owner 16 59.4 1 Non Owner 18.4 60 0 Owner 14.8 63 1 Non Owner 17.2 64.8 1 Non Owner 18.4 66 1 Non Owner 17.6 84 1 Non Owner 16.8 85.5 0 Owner 17.6 108 0 Owner If we continue splitting the mower data, the next split is on the Income variable at the value 84.75. Splitting the 24 observations by Lot Size value of 19K, and then Income value of 84.75K LR of Lot<=19 and Income <=84.75 lot Income Class Class 18.8 33 1 Non Owner 16.4 47.4 1 Non Owner 17.6 49.2 1 Non Owner 14 51 1 Non Owner 16 59.4 1 Non Owner 18.4 60 0 Owner 14.8 63 1 Non Owner 17.2 64.8 1 Non Owner 18.4 66 1 Non Owner 17.6 84 1 Non Owner
  • 6. LR of Lot<=19 and Income >84.75 lot Income Class Class 16.8 85.5 0 Owner 17.6 108 0 Owner Sort Lower rectangle of Lot <=19, Income <=84.75 with respect to the class and finalize the lot points after which the classes has never changed. Its 17.6 and 18.4. Median(17.6,18.4) = 18 LR of Lot<=19, Income <=84.75, Lot <=18 lot Income Class Class 14 51 1 Non Owner 14.8 63 1 Non Owner 16 59.4 1 Non Owner 16.4 47.4 1 Non Owner 17.2 64.8 1 Non Owner 17.6 49.2 1 Non Owner 17.6 84 1 Non Owner 2 Lot 19 12 12 Income 84.75 Owner 10
  • 7. LR of Lot<=19, Income <=84.75, Lot >18 lot Income Class Class 18.4 66 1 Non Owner 18.4 60 0 Owner 18.8 33 1 Non Owner Sort Lower rectangle of Lot <=19, Income <=84.75, Lot>18 with respect to the class and finalize the lot points after which the classes has never changed. Its 18.8 and 18.4. Median(18.8,18.4) = 18.6 LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6 lot Income Class Class 18.4 66 1 Non Owner 18.4 60 0 Owner LR of Lot<=19, Income <=84.75, Lot >18, Lot>18.6 lot Income Class Class 18.8 33 1 Non Owner 2 Lot 19 12 12 Income 84.75 Owner 10 Lot 18 7 Non Owner 3
  • 8. LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6 lot Income Class Class 18.4 66 1 Non Owner 18.4 60 0 Owner Sort Lower rectangle of Lot <=19, Income <=84.75, Lot>18, Lot<=18.6 with respect to the class and finalize the income points after which the classes has never changed. Its 60 and 66 Median(66,60) = 63 LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6, Income<=63 lot Income Class Class 18.4 60 0 Owner LR of Lot<=19, Income <=84.75, Lot >18, Lot<=18.6, Income>63 lot Income Class Class 18.4 66 1 Non Owner 2 Lot 19 12 12 Income 84.75 Owner 10 Lot 18 7 Non Owner 3 Lot 18.6 1 Non Owner 2
  • 9. Final Left Regression Tree Predict Income = 55 Lot = 18.5 Income 63 2 Lot 19 12 12 Income 84.75 Owner 10 Lot 18 7 Non Owner 3 Lot 18.6 1 Non Owner 2 1 1 Owner Non Owner
  • 10. Predict Income = 55 Lot = 18.5 Income 46.5 2 Lot 19 12 12 Income 84.75 Owner 10 Lot 18 7 Non Owner 3 Income 63 1 Non Owner 1 1 Non Owner Owner