SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Department of Computer
Science & Engineering
Topic : Decision Tree Learning
Name: Souma Maiti
Roll No. :27500120016
Subject: Machine Learning
Subject Code : PEC-CS701E
Year : 4th Semester: 7th
INTRODUCTION
• Decision Tree is a Supervised
learning technique that can be used
for both classification and
Regression problems, but mostly it
is preferred for solving
Classification problems. It is a tree-
structured classifier, where internal
nodes represent the features of a
dataset, branches represent the
decision rules and each leaf node
represents the outcome.
• It is a graphical representation for
getting all the possible solutions to
a problem/decision based on given
conditions.
Decision Tree Terminologies
• Root Node: Root node is from where the decision tree starts.
It represents the entire dataset, which further gets divided
into two or more homogeneous sets.
• Leaf Node: Leaf nodes are the final output node, and the
tree cannot be segregated further after getting a leaf node.
• Splitting: Splitting is the process of dividing the decision
node/root node into sub-nodes according to the given
conditions.
• Branch/Sub Tree: A tree formed by splitting the tree.
• Pruning: Pruning is the process of removing the unwanted
branches from the tree.
• Parent/Child node: The root node of the tree is called the
parent node, and other nodes are called the child nodes.
Decision Tree algorithm:
• Step-1: Begin the tree with the root node, says S, which contains the complete dataset.
• Step-2: Find the best attribute in the dataset using Attribute Selection Measure (ASM).
• Step-3: Divide the S into subsets that contains possible values for the best attributes.
• Step-4: Generate the decision tree node, which contains the best attribute.
• Step-5: Recursively make new decision trees using the subsets of the dataset created
in step -3. Continue this process until a stage is reached where you cannot further classify
the nodes and called the final node as a leaf node.
Attribute Selection Measures:
• While implementing a Decision tree, the main issue arises that how to select the best attribute for the
root node and for sub-nodes. So, to solve such problems there is a technique which is called as Attribute
selection measure or ASM. By this measurement, we can easily select the best attribute for the nodes of
the tree. There are two popular techniques for ASM, which are:
1. Information Gain:
• Information gain is the measurement of changes in entropy after the segmentation of a dataset based on
an attribute.
• It calculates how much information a feature provides us about a class.
• According to the value of information gain, we split the node and build the decision tree.
• A decision tree algorithm always tries to maximize the value of information gain, and a node/attribute
having the highest information gain is split first. It can be calculated using the below formula:
• Information Gain= Entropy(S)- [(Weighted Avg) *Entropy(each feature)
• Entropy: Entropy is a metric to measure the impurity in a given attribute. It specifies randomness in data.
2. Gini Index:
• Gini index is a measure of impurity or purity used while creating a decision tree in the CART(Classification
and Regression Tree) algorithm.
• An attribute with the low Gini index should be preferred as compared to the high Gini index.
• It only creates binary splits, and the CART algorithm uses the Gini index to create binary splits.
• Gini index can be calculated using the below formula:
• Gini Index= 1- ∑jPj2
Decision Tree in Machine Learning

More Related Content

ODP
Machine Learning with Decision trees
PPTX
Decision tree in artificial intelligence
PPTX
Decision Trees
PPTX
Hydro power
PDF
Lecture 5 - Agent communication
PPTX
SMART DUSTBIN FOR SMART CITIES
PPTX
Deep learning.pptx
Machine Learning with Decision trees
Decision tree in artificial intelligence
Decision Trees
Hydro power
Lecture 5 - Agent communication
SMART DUSTBIN FOR SMART CITIES
Deep learning.pptx

What's hot (20)

PPT
2.2 decision tree
PPTX
Decision tree
PPTX
Gradient descent method
PPTX
Data preprocessing in Machine learning
PPTX
Decision tree induction \ Decision Tree Algorithm with Example| Data science
PDF
Linear regression
PPTX
Support vector machines (svm)
PDF
Run time storage
PPSX
ADABoost classifier
PPTX
Decision Tree - C4.5&CART
PPT
Heuristic Search Techniques {Artificial Intelligence}
PDF
Decision trees in Machine Learning
PPTX
K-Means Clustering Algorithm.pptx
PPT
K mean-clustering
PPTX
CART Algorithm.pptx
PDF
Classification Based Machine Learning Algorithms
PDF
Hierarchical Clustering
PPTX
Decision Tree Learning
PPTX
DBSCAN (1) (4).pptx
2.2 decision tree
Decision tree
Gradient descent method
Data preprocessing in Machine learning
Decision tree induction \ Decision Tree Algorithm with Example| Data science
Linear regression
Support vector machines (svm)
Run time storage
ADABoost classifier
Decision Tree - C4.5&CART
Heuristic Search Techniques {Artificial Intelligence}
Decision trees in Machine Learning
K-Means Clustering Algorithm.pptx
K mean-clustering
CART Algorithm.pptx
Classification Based Machine Learning Algorithms
Hierarchical Clustering
Decision Tree Learning
DBSCAN (1) (4).pptx
Ad

Similar to Decision Tree in Machine Learning (20)

PPTX
Decision Tree Classification Algorithm.pptx
PDF
Machine Learning Unit-5 Decesion Trees & Random Forest.pdf
PPTX
Decision Tree.pptx
PPTX
DECESION TREE and -SVM-NAIVEs bayes-BAYS.pptx
PPTX
Supervised Learning Algorithm Slide.pptx
PDF
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
PDF
22PCOAM16 _ML_Unit 3 Notes & Question bank
PPTX
Unit 2-ML.pptx
PDF
Machine Learning Algorithm - Decision Trees
PPTX
Ai & Machine learning - 31140523010 - BDS302.pptx
PPTX
Macine learning algorithms - K means, KNN
PPTX
Machine Learning with Python unit-2.pptx
PPTX
7 Decision Trees and Entrophy in software .pptx
PDF
Chapter 4.pdf
PPTX
Random Forest Decision Tree.pptx
PPTX
23-512(Decision Tree) machine learning ppt
PPT
Lecture4.ppt
PPTX
random forest.pptx
PDF
Decision tree for data mining and computer
PPTX
Lecture 12.pptx for bca student DAA lecture
Decision Tree Classification Algorithm.pptx
Machine Learning Unit-5 Decesion Trees & Random Forest.pdf
Decision Tree.pptx
DECESION TREE and -SVM-NAIVEs bayes-BAYS.pptx
Supervised Learning Algorithm Slide.pptx
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 _ML_Unit 3 Notes & Question bank
Unit 2-ML.pptx
Machine Learning Algorithm - Decision Trees
Ai & Machine learning - 31140523010 - BDS302.pptx
Macine learning algorithms - K means, KNN
Machine Learning with Python unit-2.pptx
7 Decision Trees and Entrophy in software .pptx
Chapter 4.pdf
Random Forest Decision Tree.pptx
23-512(Decision Tree) machine learning ppt
Lecture4.ppt
random forest.pptx
Decision tree for data mining and computer
Lecture 12.pptx for bca student DAA lecture
Ad

More from Souma Maiti (20)

PDF
Mental Health prrediction system using Machine Learning Algoritms
PDF
Loan Prediction System Using Machine Learning Algorithms Project Report
PPTX
Mental Health Prediction System Using Machine Learning
PDF
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
PPTX
Types of Cyber Security Attacks- Active & Passive Attak
PPTX
E-Commerce Analysis & Strategy Presentation
PPTX
Principles of Network Security-CIAD TRIAD
PDF
Idea on Entreprenaurship
PDF
System Based Attacks - CYBER SECURITY
PDF
Operation Research
PDF
Loan Approval Prediction Using Machine Learning
PDF
Constitution of India
PDF
COMIPLER_DESIGN_1[1].pdf
PDF
Heuristic Search Technique- Hill Climbing
DOCX
SATELLITE INTERNET AND STARLINK
PPTX
Fundamental Steps Of Image Processing
PPTX
Join in SQL - Inner, Self, Outer Join
PPTX
K means Clustering Algorithm
PDF
Errors in Numerical Analysis
PPTX
Open Systems Interconnection (OSI) MODEL
Mental Health prrediction system using Machine Learning Algoritms
Loan Prediction System Using Machine Learning Algorithms Project Report
Mental Health Prediction System Using Machine Learning
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
Types of Cyber Security Attacks- Active & Passive Attak
E-Commerce Analysis & Strategy Presentation
Principles of Network Security-CIAD TRIAD
Idea on Entreprenaurship
System Based Attacks - CYBER SECURITY
Operation Research
Loan Approval Prediction Using Machine Learning
Constitution of India
COMIPLER_DESIGN_1[1].pdf
Heuristic Search Technique- Hill Climbing
SATELLITE INTERNET AND STARLINK
Fundamental Steps Of Image Processing
Join in SQL - Inner, Self, Outer Join
K means Clustering Algorithm
Errors in Numerical Analysis
Open Systems Interconnection (OSI) MODEL

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Digital-Transformation-Roadmap-for-Companies.pptx
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Electronic commerce courselecture one. Pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Monthly Chronicles - July 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Decision Tree in Machine Learning

  • 1. Department of Computer Science & Engineering Topic : Decision Tree Learning Name: Souma Maiti Roll No. :27500120016 Subject: Machine Learning Subject Code : PEC-CS701E Year : 4th Semester: 7th
  • 2. INTRODUCTION • Decision Tree is a Supervised learning technique that can be used for both classification and Regression problems, but mostly it is preferred for solving Classification problems. It is a tree- structured classifier, where internal nodes represent the features of a dataset, branches represent the decision rules and each leaf node represents the outcome. • It is a graphical representation for getting all the possible solutions to a problem/decision based on given conditions.
  • 3. Decision Tree Terminologies • Root Node: Root node is from where the decision tree starts. It represents the entire dataset, which further gets divided into two or more homogeneous sets. • Leaf Node: Leaf nodes are the final output node, and the tree cannot be segregated further after getting a leaf node. • Splitting: Splitting is the process of dividing the decision node/root node into sub-nodes according to the given conditions. • Branch/Sub Tree: A tree formed by splitting the tree. • Pruning: Pruning is the process of removing the unwanted branches from the tree. • Parent/Child node: The root node of the tree is called the parent node, and other nodes are called the child nodes.
  • 4. Decision Tree algorithm: • Step-1: Begin the tree with the root node, says S, which contains the complete dataset. • Step-2: Find the best attribute in the dataset using Attribute Selection Measure (ASM). • Step-3: Divide the S into subsets that contains possible values for the best attributes. • Step-4: Generate the decision tree node, which contains the best attribute. • Step-5: Recursively make new decision trees using the subsets of the dataset created in step -3. Continue this process until a stage is reached where you cannot further classify the nodes and called the final node as a leaf node.
  • 5. Attribute Selection Measures: • While implementing a Decision tree, the main issue arises that how to select the best attribute for the root node and for sub-nodes. So, to solve such problems there is a technique which is called as Attribute selection measure or ASM. By this measurement, we can easily select the best attribute for the nodes of the tree. There are two popular techniques for ASM, which are: 1. Information Gain: • Information gain is the measurement of changes in entropy after the segmentation of a dataset based on an attribute. • It calculates how much information a feature provides us about a class. • According to the value of information gain, we split the node and build the decision tree. • A decision tree algorithm always tries to maximize the value of information gain, and a node/attribute having the highest information gain is split first. It can be calculated using the below formula: • Information Gain= Entropy(S)- [(Weighted Avg) *Entropy(each feature) • Entropy: Entropy is a metric to measure the impurity in a given attribute. It specifies randomness in data. 2. Gini Index: • Gini index is a measure of impurity or purity used while creating a decision tree in the CART(Classification and Regression Tree) algorithm. • An attribute with the low Gini index should be preferred as compared to the high Gini index. • It only creates binary splits, and the CART algorithm uses the Gini index to create binary splits. • Gini index can be calculated using the below formula: • Gini Index= 1- ∑jPj2