SlideShare a Scribd company logo
REGRESSION TREE
INTRODUCTION
Classification Trees: When the decision tree has categorical target variable. The above tree
is an example of a classification tree because we know that there are two options for the
result.
Regression Trees: When the decision tree has a continuous target variable. For example, a
regression tree would be used for the price of a newly launched product because price can
be anything depending on various constraints.
Both types of decision trees fall under the Classification and Regression Tree (CART)
designation.
REGRESSION TREE
EXAMPLE
Standard deviation
Golf players = {25, 30, 46, 45, 52,
23, 43, 35, 38, 46, 48, 52, 44, 30}
Average of golf players = (25 +
30 + 46 + 45 + 52 + 23 + 43 + 35
+ 38 + 46 + 48 + 52 + 44 + 30
)/14 = 39.78
Standard deviation of golf
players = [( (25 – 39.78)
√ 2
+ (30
– 39.78)2
+ (46 – 39.78)2
+ … + (30
– 39.78)2
)/14] = 9.32
Golf players for sunny outlook = {25, 30, 35, 38, 48}
Average of golf players for sunny outlook = (25+30+35+38+48)/5 = 35.2
Standard deviation of golf players for sunny outlook = (((25 – 35.2)
√ 2
+ (30 – 35.2)2
+
… )/5) = 7.78
Golf players for overcast outlook = {46, 43, 52, 44}
Average of golf players for overcast outlook = (46 + 43 + 52 + 44)/4 =
46.25
Standard deviation of golf players for overcast outlook = (((46-
√
46.25)2
+(43-46.25)2
+…)= 3.49
Golf players for overcast outlook = {45, 52, 23, 46, 30}
Average of golf players for overcast outlook =
(45+52+23+46+30)/5 = 39.2
Standard deviation of golf players for rainy outlook = (((45 –
√
39.2)2
+(52 – 39.2)2
+…)/5)=10.87
Weighted standard deviation for outlook = (4/14)x3.49 +
(5/14)x10.87 + (5/14)x7.78 = 7.66
Standard deviation reduction for outlook = 9.32 – 7.66 =
1.66
Weighted standard deviation for humidity = (7/14)x9.36 +
(7/14)x8.73 = 9.04
Standard deviation reduction for humidity = 9.32 – 9.04 = 0.27
21. Regression Tree in machine learning.pptx
Root Node
Outlo
ok
!4 data - Global Std dev
5 data - Global Std dev
5
Temp
Hot
Mild
Cool
Sunny
Wind
Weak
Strong
Humidity
High
Normal
Golf players for sunny outlook = {25, 30, 35, 38, 48}
Average of golf players for sunny outlook = (25+30+35+38+48)/5 = 35.2
Standard deviation of golf players for sunny outlook = (((25 – 35.2)
√ 2
+ (30 – 35.2)2
+
… )/5) = 7.78
Considered as Global standard deviation for this sub data set = 7.78
Standard deviation for sunny
outlook and hot temperature = 2.5
Standard deviation for sunny
outlook and cool temperature = 0
Standard deviation for sunny
outlook and mild temperature =
6.5
Weighted standard deviation for sunny outlook and temperature =
(2/5)x2.5 + (1/5)x0 + (2/5)x6.5 = 3.6
Standard deviation reduction for sunny outlook and temperature =
7.78 – 3.6 = 4.18
Weighted standard deviations for sunny outlook and humidity = (3/5)x4.08 + (2/5)x5 =
4.45
Standard deviation reduction for sunny outlook and humidity = 7.78 – 4.45 = 3.33
Weighted standard deviations for sunny outlook and wind = (2/5)x9 + (3/5)x5.56 =
6.93
Standard deviation reduction for sunny outlook and wind = 7.78 – 6.93 = 0.85
Summarizing standard deviations for windy feature
when outlook is sunny
21. Regression Tree in machine learning.pptx
FINAL FORM OF REGRESSION TREE
https://sefiks.com/2018/08/28/a-step-by-step-regression-decision-tree-example/
Leaf Node =
Golf Player
5
5
1
(2) 2
Decision Tree
Entropy
Information gain – Higher gain  Best candidate to be selected as a node
Entropy – If all the data belongs to the same class label – Entropy =0 (Pure)
If the input data belongs to many class lables – Entropy = near to 1 (Impure)
Nodes  Input attributes (Ex: outlook)
Arcs/links/edges  Values of input attributes (Ex: Sunny, Rainy, Overcast)
Top node – Root node
Other nodes in the tree – Intermediate nodes
Leaf node (last level of the tree) – Identifies the corresponding class label (Ex: Play = Yes/ No)
From Decision tree  Derive classification rules
How many rules can be derived ?  No of leaf level nodes

More Related Content

PPT
introduction to machine learning 3c.pptx
PPT
machine learning.ppt
PPTX
ID3_Explanation.pptx
PDF
Aiml ajsjdjcjcjcjfjfjModule4_Pashrt1-1.pdf
PDF
ID3 -rks.pdf
PPTX
Decision Trees
PDF
Data Science Training in Bangalore | Learnbay.in | Decision Tree | Machine Le...
PDF
Regression tree
introduction to machine learning 3c.pptx
machine learning.ppt
ID3_Explanation.pptx
Aiml ajsjdjcjcjcjfjfjModule4_Pashrt1-1.pdf
ID3 -rks.pdf
Decision Trees
Data Science Training in Bangalore | Learnbay.in | Decision Tree | Machine Le...
Regression tree

Similar to 21. Regression Tree in machine learning.pptx (20)

PPT
Decision tree.10.11
PPTX
Decision Trees Learning in Machine Learning
PPTX
Classification intuition
PDF
DecisionTree akfwniajfwevmlsdijvmrglkvjc
PDF
Decision Tree
PPTX
Decision trees
PPTX
Decision tree induction \ Decision Tree Algorithm with Example| Data science
PDF
DECISION TREE USING INFORMATION GAIN.pdf
PDF
Nhan_Chapter 6_Classification 2022.pdf
PDF
Machine Learning in Bioinformatics
PPTX
Descision making descision making decision tree.pptx
PPT
decision-trees ID3 -------'xxxxxxxxx.ppt
PDF
Classification using decision tree in detail
PDF
Decision Tree in classification problems in ML
PDF
Machine Learning 2D5362
PDF
PPTX
Ml6 decision trees
PDF
forest-cover-type
PDF
lec16_ref.pdf
PDF
decision tree.pdf
Decision tree.10.11
Decision Trees Learning in Machine Learning
Classification intuition
DecisionTree akfwniajfwevmlsdijvmrglkvjc
Decision Tree
Decision trees
Decision tree induction \ Decision Tree Algorithm with Example| Data science
DECISION TREE USING INFORMATION GAIN.pdf
Nhan_Chapter 6_Classification 2022.pdf
Machine Learning in Bioinformatics
Descision making descision making decision tree.pptx
decision-trees ID3 -------'xxxxxxxxx.ppt
Classification using decision tree in detail
Decision Tree in classification problems in ML
Machine Learning 2D5362
Ml6 decision trees
forest-cover-type
lec16_ref.pdf
decision tree.pdf
Ad

More from angelinjeba6 (20)

PPTX
NLP-Components NLP-ComponentsNLP-Components.pptx
PPTX
REVIEW_Practicum1_NLP REVIEW_Practicum1_NLP.pptx
PPTX
STUDENT ACTIVITIES_NLP STUDENT ACTIVITIES_NLP.pptx
PPTX
AI-in-Cybersecurity AI-in-Cybersecurity.pptx
PPTX
Applying-AIAI-in-CybersecurityAI-in-Cybersecurity-in-Cybersecurity.pptx
PPTX
Exercise no: 6 java script fundamentals.pptx
PPTX
1 Intro of web technology and sciences .pptx
PPT
rules classifier in machine learning .ppt
PPTX
Loss function in machine learning .pptx
PPTX
Module 1 Taxonomy of Machine L(1).pptx
PPTX
decision tree DECISION TREE IN MACHINE .pptx
PPTX
K means ALGORITHM IN MACHINE LEARNING.pptx
PPTX
Support vector machine_new SVM presentation.pptx
PPTX
INTELL ACTUAL PROPERTY. INTELL ACTUAL PROPERTY.pptx
PPTX
Multiple Linear Regressionnnnnnnnnnn.pptx
PPTX
normalisation jdsuhduswwhdusw cdscsacasc.pptx
PPT
311----introduction tomachinelearning.ppt
PPTX
Dynamic and Embedded SQL for db practices.pptx
PPT
artificial engineering the future of computing
PPTX
1 Json Intro and datatype PRESENTATION.pptx
NLP-Components NLP-ComponentsNLP-Components.pptx
REVIEW_Practicum1_NLP REVIEW_Practicum1_NLP.pptx
STUDENT ACTIVITIES_NLP STUDENT ACTIVITIES_NLP.pptx
AI-in-Cybersecurity AI-in-Cybersecurity.pptx
Applying-AIAI-in-CybersecurityAI-in-Cybersecurity-in-Cybersecurity.pptx
Exercise no: 6 java script fundamentals.pptx
1 Intro of web technology and sciences .pptx
rules classifier in machine learning .ppt
Loss function in machine learning .pptx
Module 1 Taxonomy of Machine L(1).pptx
decision tree DECISION TREE IN MACHINE .pptx
K means ALGORITHM IN MACHINE LEARNING.pptx
Support vector machine_new SVM presentation.pptx
INTELL ACTUAL PROPERTY. INTELL ACTUAL PROPERTY.pptx
Multiple Linear Regressionnnnnnnnnnn.pptx
normalisation jdsuhduswwhdusw cdscsacasc.pptx
311----introduction tomachinelearning.ppt
Dynamic and Embedded SQL for db practices.pptx
artificial engineering the future of computing
1 Json Intro and datatype PRESENTATION.pptx
Ad

Recently uploaded (20)

PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Construction Project Organization Group 2.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
web development for engineering and engineering
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Geodesy 1.pptx...............................................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT
Project quality management in manufacturing
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Arduino robotics embedded978-1-4302-3184-4.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
additive manufacturing of ss316l using mig welding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Construction Project Organization Group 2.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
web development for engineering and engineering
OOP with Java - Java Introduction (Basics)
Geodesy 1.pptx...............................................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Project quality management in manufacturing
Internet of Things (IOT) - A guide to understanding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx

21. Regression Tree in machine learning.pptx

  • 2. INTRODUCTION Classification Trees: When the decision tree has categorical target variable. The above tree is an example of a classification tree because we know that there are two options for the result. Regression Trees: When the decision tree has a continuous target variable. For example, a regression tree would be used for the price of a newly launched product because price can be anything depending on various constraints. Both types of decision trees fall under the Classification and Regression Tree (CART) designation.
  • 4. EXAMPLE Standard deviation Golf players = {25, 30, 46, 45, 52, 23, 43, 35, 38, 46, 48, 52, 44, 30} Average of golf players = (25 + 30 + 46 + 45 + 52 + 23 + 43 + 35 + 38 + 46 + 48 + 52 + 44 + 30 )/14 = 39.78 Standard deviation of golf players = [( (25 – 39.78) √ 2 + (30 – 39.78)2 + (46 – 39.78)2 + … + (30 – 39.78)2 )/14] = 9.32
  • 5. Golf players for sunny outlook = {25, 30, 35, 38, 48} Average of golf players for sunny outlook = (25+30+35+38+48)/5 = 35.2 Standard deviation of golf players for sunny outlook = (((25 – 35.2) √ 2 + (30 – 35.2)2 + … )/5) = 7.78
  • 6. Golf players for overcast outlook = {46, 43, 52, 44} Average of golf players for overcast outlook = (46 + 43 + 52 + 44)/4 = 46.25 Standard deviation of golf players for overcast outlook = (((46- √ 46.25)2 +(43-46.25)2 +…)= 3.49
  • 7. Golf players for overcast outlook = {45, 52, 23, 46, 30} Average of golf players for overcast outlook = (45+52+23+46+30)/5 = 39.2 Standard deviation of golf players for rainy outlook = (((45 – √ 39.2)2 +(52 – 39.2)2 +…)/5)=10.87
  • 8. Weighted standard deviation for outlook = (4/14)x3.49 + (5/14)x10.87 + (5/14)x7.78 = 7.66 Standard deviation reduction for outlook = 9.32 – 7.66 = 1.66
  • 9. Weighted standard deviation for humidity = (7/14)x9.36 + (7/14)x8.73 = 9.04 Standard deviation reduction for humidity = 9.32 – 9.04 = 0.27
  • 11. Root Node Outlo ok !4 data - Global Std dev 5 data - Global Std dev 5 Temp Hot Mild Cool Sunny Wind Weak Strong Humidity High Normal
  • 12. Golf players for sunny outlook = {25, 30, 35, 38, 48} Average of golf players for sunny outlook = (25+30+35+38+48)/5 = 35.2 Standard deviation of golf players for sunny outlook = (((25 – 35.2) √ 2 + (30 – 35.2)2 + … )/5) = 7.78 Considered as Global standard deviation for this sub data set = 7.78
  • 13. Standard deviation for sunny outlook and hot temperature = 2.5 Standard deviation for sunny outlook and cool temperature = 0 Standard deviation for sunny outlook and mild temperature = 6.5
  • 14. Weighted standard deviation for sunny outlook and temperature = (2/5)x2.5 + (1/5)x0 + (2/5)x6.5 = 3.6 Standard deviation reduction for sunny outlook and temperature = 7.78 – 3.6 = 4.18
  • 15. Weighted standard deviations for sunny outlook and humidity = (3/5)x4.08 + (2/5)x5 = 4.45 Standard deviation reduction for sunny outlook and humidity = 7.78 – 4.45 = 3.33 Weighted standard deviations for sunny outlook and wind = (2/5)x9 + (3/5)x5.56 = 6.93 Standard deviation reduction for sunny outlook and wind = 7.78 – 6.93 = 0.85 Summarizing standard deviations for windy feature when outlook is sunny
  • 17. FINAL FORM OF REGRESSION TREE https://sefiks.com/2018/08/28/a-step-by-step-regression-decision-tree-example/ Leaf Node = Golf Player 5 5 1 (2) 2
  • 18. Decision Tree Entropy Information gain – Higher gain  Best candidate to be selected as a node Entropy – If all the data belongs to the same class label – Entropy =0 (Pure) If the input data belongs to many class lables – Entropy = near to 1 (Impure) Nodes  Input attributes (Ex: outlook) Arcs/links/edges  Values of input attributes (Ex: Sunny, Rainy, Overcast) Top node – Root node Other nodes in the tree – Intermediate nodes Leaf node (last level of the tree) – Identifies the corresponding class label (Ex: Play = Yes/ No) From Decision tree  Derive classification rules How many rules can be derived ?  No of leaf level nodes