SlideShare a Scribd company logo
CLASSIFICATION:
DECISIONTREE
Sarvajanik College of Engineering &Technology
Computer (Shift-1) 7th year Group 9 (Morning)
Prepared by:
Name Enrollment No
Yazad Dumasia 140420107015
Karan Gajjar 140420107016
Vievk Kadhiwala 140420107022
Darshan Koshiya 140420107025
Presented To:
Prof. Rakesh Patel
Prof. Snehal Gandhi
Introduction to Classification
• Classification, the task of assigning objects to one of several predefined
categories or class.
• Given a collection of records (training set )
• Each record contains a set of attributes, one of the attributes is the class.
• Find a model for class attribute as a function of the values of other attributes.
• Goal: previously unseen records should be assigned a class as accurately as
possible.
• A test set is used to determine the accuracy of the model. Usually, the given
data set is divided into training and test sets, with training set used to build the
model and test set used to validate it.
Introduction to Classification
Tid Attrib1 Attrib2 Attrib3 Class
1 Yes large 120k No
2 No Medium 110k No
3 No Small 75k No
4 Yes Medium 130k No
5 No Large 85k Yes
6 No Medium 60k No
7 Yes Large 220k No
8 No Small 85k Yes
9 No Medium 75k No
10 no Small 90k Yes
Model
Tid
Attrib1 Attrib2 Attrib3 Class
11 No Small 1300k ?
12 Yes Medium 90k ?
13 Yes Large 105k ?
14 No Small 90k ?
15 No Large 65k ?
Learning
algorithm
Learn
Model
Apply
Model
Deduction
Induction
•Example of Classification techniques:
- Decision Tree 
- Neural Network
- Rule-Based
- naïve Bayes Classifier, etc.
• Classification techniques are most suited for predicting data sets with binary
or nominal categories. They are less effective for ordinal categories since
they do not consider the implicit order among the categories.
Classification techniques
Following are the examples of cases where the data analysis task is Classification
• A bank loan officer wants to analyze the data in order to know which customer (loan applicant)
are risky or which are safe.
• A marketing manager at a company needs to analyze a customer with a given profile, who will
buy a new computer.
• In both of the above examples, a model or classifier is constructed to predict the categorical
labels. These labels are risky or safe for loan application data and yes or no for marketing data.
Example of Classification
•A basic algorithm for learning decision trees is as below.
•During tree construction, attribute selection measures are used to
select the attribute that best partitions the tuples into distinct
classes.
•When decision trees are built, many of the branches may reflect
noise or outliers in the training data.
•Tree pruning attempts to identify and remove such branches, with
the goal of improving classification accuracy on unseen data.
DECISION TREE
• Classification and Regression algorithm
• Twoig
• Gini
• Entropy-based algorithm
• ID3
• C4.5
• Construction of a decision tree is possible in two ways:
Based on the training data
Top-Down strategy Down strategy
DECISION TREE
Example to generate decision tree
The data set has five attributes.
► There is a special attribute: the attribute class is the class label.
► The attributes, temp (temperature) and humidity are numerical
Attributes
► Other attributes are categorical, that is, they cannot be ordered.
► Based on the training data set, we want to find a set of rules to
know what values of outlook, temperature, humidity and wind,
determine whether or not to play Tennis.
From the given sample data we can observe that
Outlook= {Sunny , Overcast , Rain}
Temperature= {Hot , Mild , cool}
Humidity={ High , Normal}
Wind speed = {Weak , Strong } 10
ClassTraining data set for Play Golf
Day Outlook Temp Humidity Wind
speed
Play
ball
1 Rainy Hot High False No
2 Rainy Hot High True No
3 Overcast Hot High False Yes
4 Sunny Mild High False Yes
5 Sunny Cool Normal False Yes
6 Sunny Cool Normal True No
7 Overcast Cool Normal True Yes
8 Rainy Mild High False No
9 Rainy Cool Normal False Yes
10 Sunny Mild Normal False Yes
11 Rainy Mild Normal Strong Yes
12 Overcast Mild High True Yes
13 Overcast Hot Normal False Yes
14 Sunny Mild High True No
• Consider the following training data set.
• There are three attributes, namely, age, pin code
and class.
• The attribute class is used for class label.
The attribute age is a numeric attribute, whereas
pin code is a categorical one.
Though the domain of pin code is numeric, no
ordering can be define d among pin code values.
You cannot derive any useful information if one
pin-code is greater than another pin code.
Concept of Categorical Attributes
ID AGE PINCODE CLASS
1 30 395003 C1
2 25 395003 C1
3 21 395013 C2
4 43 395003 C1
5 18 395013 C2
6 33 395013 C1
7 29 395013 C1
8 55 395003 C2
9 48 395003 C1
Another Example
Figuregivesadecisiontreeforthetraining
datatrainingdata.
Thesplittingattributeattherootispincode
andthesplittingcriterionandthesplitting
criterionhereispincode=395003.
Similarly,fortheleftchildnode,thesplitting
criterionisage<48(thesplittingattributeis
age).
Althoughtherightchildnodehasthesame
attributeasthesplittingattribute,the
splittingcriterionisdifferent.
Pincode = 395003 {1-9}
Age <=48;
[1,2,4,8,9]
C2:8C1: [1,2,4,9]
Age <=21;
[3,5,6,7]
C1 : [6,7]C2:[3,5]
Atrootlevel,wehave9records.Theassociated
splittingcriterionis pincode=395003.
Asaresult,wesplittherecordsintotwosubsets.
Records1,2,4,8,and9aretotheleftchildnote
andremainingtotherightnode.
Theprocessisrepeatedateverynode.
• Invented by J.Ross Quinlan in 1975.
• Each node corresponds to a splitting attribute
• Each arc is a possible value of that attribute.
• At each node the splitting attribute is selected to be the most informative among the
attributes not yet considered in the path from the root.
• Entropy is used to measure how informative is a node.
Iterative Dichotomizer 3 (ID3)
• Used to generate a decision tree from a given data set by employing a
top-down, greedy search, to test each attribute at every node of the tree.
• The resulting tree is used to classify future samples.
ID3 (Iterative Dichotomiser 3): Basic Idea
• Entropy, as it relates to machine learning, is a measure of the randomness in the information
being processed.
• The higher the entropy, the harder it is to draw any conclusions from that information.
• Flipping a coin is an example of an action that provides information that is random. For a coin
that has no affinity for 'heads' or 'tails', the outcome of any number of tosses is difficult to
predict. Why?
• Because there is no relationship between flipping, and the outcome. This is the essence of
entropy.
What is entropy in decision tree ?
Entropy
 In order to define information gain precisely, we need to discuss entropy
first.
 A formula to calculate the homogeneity of a sample.
 A completely homogeneous sample has entropy of 0 (leaf node).
 An equally divided sample has entropy of 1.
 The formula for entropy is:
 where p(I) is the proportion of S belonging to class I.
 ∑ is over total outcomes. Log2 is log base 2.
Entropy(S) = -p(I) log2 p(I)<=1
Example for understand Entropy :
Example 1
 If S is a collection of 14 examples with 9 YES and 5 NO examples then
 Entropy(S) = - (9/14) Log2 (9/14) - (5/14) Log2 (5/14)
= 0.940
A collection S consists of 20 data examples:
13 Yes : 7 No
Entropy(S) = – (13/20) Log2(13/20)– (7/20) Log2(7/20)
Entropy(S) = 0.934
• Informationgainistheamountofinformationthat'sgainedbyknowingthe
valueoftheattribute,whichistheentropyofthedistributionbeforethesplit
minustheentropyofthedistributionafterit.Thelargestinformationgainis
equivalenttothesmallestentropy.
What is information gain in data mining?
Play Golf
Yes No
Outlook
Sunny 3 2 5
Overcast 4 0 4
Rainy 2 3 5
14
E(PlayGolf,outlook) = P(Sunny)*E(3,2) + P(Overcast)*E(4,0)+P(Rainy)*E(2,3)
= (5/14)*0.971 +(4/14)*0.0 +(5/14)*0.971
=0.693
Movie Example
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
2 United States No Comedy False
3 United States Yes Comedy True
4 India No Comedy True
5 India Yes Science Fiction False
6 India Yes Romance False
7 Rest of World Yes Comedy False
8 Rest of World No Science Fiction False
9 India Yes Comedy True
10 United States Yes Comedy True
Entropy ofTable
Is the Film a Success?
Entropy(5 Yes, 5 No) = –[ (5/10) Log2(5/10) + (5/10) Log2(5/10)]
Entropy(Success) = 1
Split – Country of Origin
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
2 United States No Comedy False
3 United States Yes Comedy True
4 United States Yes Comedy True
Film Country of Origin Big Star Genre Success
1 India No Comedy True
2 India Yes Science Fiction False
3 India Yes Romance False
4 India Yes Comedy True
Film Country of Origin Big Star Genre Success
1 Rest of World Yes Comedy False
2 Rest of World No Science Fiction False
Gain – Country of Origin
Where is the film from?
Entropy(USA) = – (3/4) Log2(3/4) – (1/4) Log2(1/4)
Entropy(USA) = 0.811
Entropy(India) = – (2/4) Log2(2/4) – (2/4) Log2(2/4)
Entropy(India) = 1
Entropy(Rest of World) = – (0/2) Log2(0/2) – (2/2) Log2(2/2)
Entropy(Rest of World) = 0
Gain(Origin) = 1 – (4/10 *0.811 + 4/10*1 + 2/10*0) = 0.276
Split – Big Star
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
2 United States Yes Comedy True
3 India Yes Science Fiction False
4 India Yes Romance False
5 Rest of World Yes Comedy False
6 India Yes Comedy True
7 United States Yes Comedy True
Film Country of Origin Big Star Genre Success
1 United States No Comedy False
2 India No Comedy True
3 Rest of World No Science Fiction False
Gain – Big Star
Is there a Big Star in the film?
Entropy(Yes) = – (4/7) Log2(4/7) – (3/7) Log2(3/7)
Entropy(Yes) = 0.985
Entropy(No) = – (1/3) Log2(1/3) – (2/3) Log2(2/3)
Entropy(No) = 0.918
Gain(Star) = 1 – (7/10 *0.985 + 3/10*0.918) = 0.0351
Split – Genre
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
2 India Yes Science Fiction False
3 Rest of World No Science Fiction False
Film Country of Origin Big Star Genre Success
1 United States No Comedy False
2 United States Yes Comedy True
3 India No Comedy True
4 Rest of World Yes Comedy False
5 India Yes Comedy True
6 United States Yes Comedy True
Film Country of Origin Big Star Genre Success
1 India Yes Romance False
Gain – Genre
What genre is the film?
Entropy(SciFi) = – (1/3) Log2(1/3) – (2/3) Log2(2/3)
Entropy(SciFi) = 0.918
Entropy(Com) = – (4/6) Log2(4/6) – (2/6) Log2(2/6)
Entropy(Com) = 0.918
Entropy(Rom) = – (0/1) Log2(0/1) – (1/1) Log2(1/1)
Entropy(Rom) = 0
Gain(Genre) = 1 – (3/10 *0.918 + 6/10*0.918+ 1/10*0) = 0.1738
Compare Gains…
Gain(Origin) = 0.276
Gain(Star) = 0.0351
Gain(Genre) = 0.1738
Gain(Origin) = 0.276
Gain(Star) = 0.0351
Gain(Genre) = 0.1738
First Split: Origin
All Movies
NewTable
United States
India
NewTable NewTable
All Movies
NewTable
United States
India
Rest of World
NewTable NewTable
NewTable – United States
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
2 United States No Comedy False
3 United States Yes Comedy True
4 United States Yes Comedy True
Entropy(3Yes, 1 No) = – (3/4) Log2(3/4) – (1/4) Log2(1/4)
Entropy(Success) = 0.811
Split – Big Star
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
2 United States Yes Comedy True
3 United States Yes Comedy True
Film Country of Origin Big Star Genre Success
1 United States No Comedy False
Gain – Big Star
Is there a Big Star in the film?
Entropy(Yes) = – (3/3) Log2(3/3) – (0/3) Log2(0/3)
Entropy(Yes) = 0
Entropy(No) = – (0/1) Log2(0/1) – (1/1) Log2(1/1)
Entropy(No) = 0
Gain(Star) = 0.811 – (3/4 *0 + 1/4*0) = 0.811
Split – Genre
Film Country of Origin Big Star Genre Success
1 United States Yes Science Fiction True
Film Country of Origin Big Star Genre Success
1 United States No Comedy False
2 United States Yes Comedy True
3 United States Yes Comedy True
Gain – Genre
What genre is the film?
Entropy(SciFi) = – (1/1) Log2(1/1) – (0/1) Log2(0/1)
Entropy(SciFi) = 0
Entropy(Com) = – (2/3) Log2(2/3) – (1/3) Log2(1/3)
Entropy(Com) = 0.918
Gain(Genre) = 0.811 – (1/4 *0 + 3/4*0.918) = 0.1225
Compare Gains…
Gain(Star) = 0.811
Gain(Genre) = 0.1225
Gain(Star) = 0.811
Gain(Genre) = 0.1225
Split: Star
All Movies
United States
India
Rest of World
NewTable NewTableTable
Star No Star
NewTable NewTable
All Movies
United States
India
Rest of World
NewTable NewTableTable
Star
No Star
Table
Failure
Sci-Fi Comedy
Success Success
All Movies
United States
India
Rest of World
Table
Table
Table
Star No Star
Table
Failure
Sci-Fi
Comedy
Success Success
Star No Star
Table Success
Sci-Fi Comedy
Success Success
All Movies
United States
India Rest of World
Table
Table
Table
Star No Star
NewTable Failure
Sci-Fi Comedy
Success Success
Star No Star
NewTable
Success
Sci-Fi
Comedy
Success Success
Comedy from the India, with a big star…
Day Outlook Temp Humidity Wind speed Play ball
1 Rainy Hot High False No
2 Rainy Hot High True No
3 Overcast Hot High False Yes
4 Sunny Mild High False Yes
5 Sunny Cool Normal False Yes
6 Sunny Cool Normal True No
7 Overcast Cool Normal True Yes
8 Rainy Mild High False No
9 Rainy Cool Normal False Yes
10 Sunny Mild Normal False Yes
11 Rainy Mild Normal Strong Yes
12 Overcast Mild High True Yes
13 Overcast Hot Normal False Yes
14 Sunny Mild High True No
SolutionTraining data set for Play Golf
Step 1: Calculate entropy of the target.
Entropy(Play Golf) = Entropy( Nos_of_No , Nos_of_Yes )
= Entropy(5,9)
= Entropy(0.36 , 0.64)
= – (0.36) Log2 (0.36) – (0.64) Log2 (0.64)
= 0.94
Entropy(Play Golf) = 0.94
Step 2: The dataset is then split on the different attributes. The entropy for each branch
is calculated. Then it is added proportionally, to get total entropy for the split. The
resulting entropy is subtracted from the entropy before the split. The result is the
Information Gain, or decrease in entropy.
Play Golf
Yes No
Outlook
Sunny 3 2
Overcast 4 0
Rainy 2 3
Gain=0.247
Play Golf
Yes No
Temp.
Hot 2 2
Mild 4 2
Cool 3 1
Gain=0.029
Play Golf
Yes No
Humidity
High 3 4
Normal 6 1
Gain=0.152
Play Golf
Yes No
Windy
False 6 2
True 3 3
Gain=0.048
Gain(T,X) = Entropy(T) -Entropy(x)
G(Play Golf , Outlook)
= Entropy(Play Golf)- Entropy(Play Golf ,
Outlook)
= 0.940-0.693
= 0.247
Step 3: Choose attribute with the largest information
gain as the decision node, divide the dataset by its
branches and repeat the same process on every
branch.
Play Golf
Yes No
Outlook
Sunny 3 2
Overcast 4 0
Rainy 2 3
Gain=0.247
Outlook
SunnyOvercastRainy Outlook Temp Humidity Windy Play Golf
Sunny Mild High False Yes
Sunny Cool Normal False Yes
Sunny Cool Normal True No
Sunny Mild Normal False Yes
Sunny Mild High True No
Outlook Temp Humidity Windy Play Golf
Overcast Hot High False Yes
Overcast Cool Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Outlook Temp Humidity Windy Play Golf
Rainy Hot High False No
Rainy Hot High True No
Rainy Mild High True Yes
Rainy Cool Normal False Yes
Rainy Mild Normal True Yes
Step 4a: A branch with entropy of 0 is a leaf node.
Temp Humidity Windy Play Golf
Hot High False Yes
Cool Normal True Yes
Mild High True Yes
Hot Normal False Yes
Outlook
Sunny Overcast Rainy
Play=
Yes
Step 4b: A branch with entropy more than 0 needs further splitting.
Temp Humidity Windy Play Golf
Mild High False Yes
Cool Normal False Yes
Cool Normal True No
Mild Normal False Yes
Mild High True No
Outlook
Sunny Overcast Rain
Windy
Yes
TrueFalse
NoYes
Step 5: The ID3 algorithm is run recursively on the non-leaf branches,
until all data is classified.
Decision Tree to Decision Rules
A decision tree can easily be transformed to a set of rules by mapping from the root node to the leaf
nodes one by one.
Therefore the final decision tree is
Outlook
RainyOvercastSunny
HumidityWind speed
Yes
HighNormal
NoYes
False True
Yes No
• A decision tree construction process is concerned with identifying the splitting attributes an d
splitting criterion at every level o f t he tree.
• Major strengths are:
• Decision tree able to generate understandable rules.
• They are able to handle both numerical and categorical attributes.
• They provide clear indication of which fields are most important for prediction or classification
prediction or classification.
• Weaknesses are:
• The process of growing a decision tree is computationally expensive.
• AtThe process of growing a decision tree is computationally expensive. At each node, each candidate splitting
field is examined before its best split can be found.
• Some decision tree can only deal with binary-valued target classes.
Advantages and Shortcomings of Decision Tree Classifications
DECISIONTREE APPLICATIONS
• Business Management
In the past decades, many organizations had created their own databases to enhance their customer services. Decision trees are a
possible way to extract useful information from databases and they have already been employed in many applications in the domain of
business and management. In particular, decision tree modelling is widely used in customer relationship management and fraud
detection, which are presented in subsections below.
• Customer Relationship Management : A frequently used approach to manage customers’ relationships is to investigate how
individuals access online services. Such an investigation is mainly performed by collecting and analyzing individuals’ usage data and
then providing recommendations based on the extracted information.
• Fraudulent Statement Detection :Another widely used business application is the detection of Fraudulent Financial Statements
(FFS)
• Engineering :
The other important application domain that decision trees can support is engineering. In particular, decision trees are widely used in
energy consumption and fault diagnosis, which are described in subsections below.
• Energy Consumption : Energy consumption concerns how much electricity has been used by individuals. The investigation of
energy consumption becomes an important issue as it helps utility companies identify the amount of energy needed.
• Fault Diagnosis : Another widely used application in the engineering domain is the detection of faults, especially in the
identification of a faulty bearing in rotary machineries.
• Healthcare Management: As decision tree modelling can be used for making predictions, there are an increasing number of studies
that investigate to use decision trees in health-care management. 48
Conclusion
 The decision tree method is a powerful statistical tool for classification, prediction,
interpretation, and data manipulation that has several potential applications in medical
research. Using decision tree models to describe research findings has the following
advantages:
 • Simplifies complex relationships between input variables and target variables by
dividing original input variables into significant subgroups.
 • Easy to understand and interpret.
 • Non-parametric approach without distributional assumptions.
 • Easy to handle missing values without needing to resort to imputation.
 • Easy to handle heavy skewed data without needing to resort to data transformation.
 • Robust to outliers. -
QUESTIONS &
DISCUSSION

More Related Content

What's hot (20)

PPSX
Decision tree Using c4.5 Algorithm
Mohd. Noor Abdul Hamid
 
PPTX
Random Forest Classifier in Machine Learning | Palin Analytics
Palin analytics
 
PPT
Slide3.ppt
butest
 
PPTX
boosting algorithm
Prithvi Paneru
 
PPT
2.4 rule based classification
Krish_ver2
 
PPT
Decision tree
Soujanya V
 
PPT
Decision tree and random forest
Lippo Group Digital
 
PDF
Decision trees in Machine Learning
Mohammad Junaid Khan
 
PPTX
Supervised and unsupervised learning
Paras Kohli
 
PPT
Chapter - 5 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
error007
 
ODP
Machine Learning with Decision trees
Knoldus Inc.
 
PDF
Data Visualization With R
Rsquared Academy
 
PPTX
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Simplilearn
 
PDF
Classification in Data Mining
Rashmi Bhat
 
PPTX
Introduction to Clustering algorithm
hadifar
 
PDF
Apriori
Khaled Boussaidi
 
PDF
Decision Tree Algorithm | Decision Tree in Python | Machine Learning Algorith...
Edureka!
 
PPT
2.2 decision tree
Krish_ver2
 
PPTX
Decision tree induction \ Decision Tree Algorithm with Example| Data science
MaryamRehman6
 
Decision tree Using c4.5 Algorithm
Mohd. Noor Abdul Hamid
 
Random Forest Classifier in Machine Learning | Palin Analytics
Palin analytics
 
Slide3.ppt
butest
 
boosting algorithm
Prithvi Paneru
 
2.4 rule based classification
Krish_ver2
 
Decision tree
Soujanya V
 
Decision tree and random forest
Lippo Group Digital
 
Decision trees in Machine Learning
Mohammad Junaid Khan
 
Supervised and unsupervised learning
Paras Kohli
 
Chapter - 5 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
error007
 
Machine Learning with Decision trees
Knoldus Inc.
 
Data Visualization With R
Rsquared Academy
 
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Simplilearn
 
Classification in Data Mining
Rashmi Bhat
 
Introduction to Clustering algorithm
hadifar
 
Decision Tree Algorithm | Decision Tree in Python | Machine Learning Algorith...
Edureka!
 
2.2 decision tree
Krish_ver2
 
Decision tree induction \ Decision Tree Algorithm with Example| Data science
MaryamRehman6
 

Similar to Classification decision tree (20)

PPTX
03-classificationTrees03-classificationTrees.pptx
DavidClement34
 
PPT
Chapter 08 Class_Basic.ppt DataMinning
nayabkainat470
 
PPTX
Lect9 Decision tree
hktripathy
 
PPTX
Data Science-entropy machine learning.pptx
ZainabShahzad9
 
PPT
Classification (ML).ppt
rajasamal1999
 
PPT
08 classbasic
engrasi
 
PPT
08 classbasic
ritumysterious1
 
PPT
ClassificationOfMachineLearninginCSE.ppt
fizarcse
 
PPT
Data-Mining
Wakimul Alam
 
PPT
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
butest
 
PPT
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Salah Amean
 
PDF
Decision trees
Ncib Lotfi
 
PDF
08 classbasic
JoonyoungJayGwak
 
PPTX
decisiontree-110906040745-phpapp01.pptx
ABINASHPADHY6
 
PPTX
DecisionTree.pptx for btech cse student
MaushamkumarRay
 
PDF
Decision Trees - The Machine Learning Magic Unveiled
Luca Zavarella
 
PPTX
Dataming-chapter-7-Classification-Basic.pptx
HimanshuSharma997566
 
PPTX
Unit 4 Classification of data and more info on it
randomguy1722
 
PPT
Machine Learning
butest
 
03-classificationTrees03-classificationTrees.pptx
DavidClement34
 
Chapter 08 Class_Basic.ppt DataMinning
nayabkainat470
 
Lect9 Decision tree
hktripathy
 
Data Science-entropy machine learning.pptx
ZainabShahzad9
 
Classification (ML).ppt
rajasamal1999
 
08 classbasic
engrasi
 
08 classbasic
ritumysterious1
 
ClassificationOfMachineLearninginCSE.ppt
fizarcse
 
Data-Mining
Wakimul Alam
 
Software-Praktikum SoSe 2005 Lehrstuhl fuer Maschinelles ...
butest
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Salah Amean
 
Decision trees
Ncib Lotfi
 
08 classbasic
JoonyoungJayGwak
 
decisiontree-110906040745-phpapp01.pptx
ABINASHPADHY6
 
DecisionTree.pptx for btech cse student
MaushamkumarRay
 
Decision Trees - The Machine Learning Magic Unveiled
Luca Zavarella
 
Dataming-chapter-7-Classification-Basic.pptx
HimanshuSharma997566
 
Unit 4 Classification of data and more info on it
randomguy1722
 
Machine Learning
butest
 
Ad

More from yazad dumasia (8)

PPTX
Introduction to Pylab and Matploitlib.
yazad dumasia
 
PPTX
Schemas for multidimensional databases
yazad dumasia
 
PPTX
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
yazad dumasia
 
PPTX
Basic economic problem: Inflation
yazad dumasia
 
PPTX
Groundwater contamination
yazad dumasia
 
PPTX
Merge sort analysis and its real time applications
yazad dumasia
 
PPTX
Cyber crime
yazad dumasia
 
PPTX
Managing input and output operation in c
yazad dumasia
 
Introduction to Pylab and Matploitlib.
yazad dumasia
 
Schemas for multidimensional databases
yazad dumasia
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
yazad dumasia
 
Basic economic problem: Inflation
yazad dumasia
 
Groundwater contamination
yazad dumasia
 
Merge sort analysis and its real time applications
yazad dumasia
 
Cyber crime
yazad dumasia
 
Managing input and output operation in c
yazad dumasia
 
Ad

Recently uploaded (20)

PDF
Driving Employee Engagement in a Hybrid World.pdf
Mia scott
 
PPTX
apidays Singapore 2025 - The Quest for the Greenest LLM , Jean Philippe Ehre...
apidays
 
PPTX
Advanced_NLP_with_Transformers_PPT_final 50.pptx
Shiwani Gupta
 
PDF
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
PPTX
apidays Helsinki & North 2025 - APIs at Scale: Designing for Alignment, Trust...
apidays
 
PDF
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays
 
PDF
Using AI/ML for Space Biology Research
VICTOR MAESTRE RAMIREZ
 
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
PPTX
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
PDF
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
apidays
 
PPTX
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
PPT
AI Future trends and opportunities_oct7v1.ppt
SHIKHAKMEHTA
 
PDF
apidays Singapore 2025 - The API Playbook for AI by Shin Wee Chuang (PAND AI)
apidays
 
PDF
apidays Singapore 2025 - Surviving an interconnected world with API governanc...
apidays
 
PDF
OPPOTUS - Malaysias on Malaysia 1Q2025.pdf
Oppotus
 
PPTX
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
PPT
Growth of Public Expendituuure_55423.ppt
NavyaDeora
 
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
PDF
Research Methodology Overview Introduction
ayeshagul29594
 
Driving Employee Engagement in a Hybrid World.pdf
Mia scott
 
apidays Singapore 2025 - The Quest for the Greenest LLM , Jean Philippe Ehre...
apidays
 
Advanced_NLP_with_Transformers_PPT_final 50.pptx
Shiwani Gupta
 
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
apidays Helsinki & North 2025 - APIs at Scale: Designing for Alignment, Trust...
apidays
 
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays
 
Using AI/ML for Space Biology Research
VICTOR MAESTRE RAMIREZ
 
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
apidays
 
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
AI Future trends and opportunities_oct7v1.ppt
SHIKHAKMEHTA
 
apidays Singapore 2025 - The API Playbook for AI by Shin Wee Chuang (PAND AI)
apidays
 
apidays Singapore 2025 - Surviving an interconnected world with API governanc...
apidays
 
OPPOTUS - Malaysias on Malaysia 1Q2025.pdf
Oppotus
 
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
Growth of Public Expendituuure_55423.ppt
NavyaDeora
 
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
Research Methodology Overview Introduction
ayeshagul29594
 

Classification decision tree

  • 1. CLASSIFICATION: DECISIONTREE Sarvajanik College of Engineering &Technology Computer (Shift-1) 7th year Group 9 (Morning)
  • 2. Prepared by: Name Enrollment No Yazad Dumasia 140420107015 Karan Gajjar 140420107016 Vievk Kadhiwala 140420107022 Darshan Koshiya 140420107025 Presented To: Prof. Rakesh Patel Prof. Snehal Gandhi
  • 4. • Classification, the task of assigning objects to one of several predefined categories or class. • Given a collection of records (training set ) • Each record contains a set of attributes, one of the attributes is the class. • Find a model for class attribute as a function of the values of other attributes. • Goal: previously unseen records should be assigned a class as accurately as possible. • A test set is used to determine the accuracy of the model. Usually, the given data set is divided into training and test sets, with training set used to build the model and test set used to validate it. Introduction to Classification
  • 5. Tid Attrib1 Attrib2 Attrib3 Class 1 Yes large 120k No 2 No Medium 110k No 3 No Small 75k No 4 Yes Medium 130k No 5 No Large 85k Yes 6 No Medium 60k No 7 Yes Large 220k No 8 No Small 85k Yes 9 No Medium 75k No 10 no Small 90k Yes Model Tid Attrib1 Attrib2 Attrib3 Class 11 No Small 1300k ? 12 Yes Medium 90k ? 13 Yes Large 105k ? 14 No Small 90k ? 15 No Large 65k ? Learning algorithm Learn Model Apply Model Deduction Induction
  • 6. •Example of Classification techniques: - Decision Tree  - Neural Network - Rule-Based - naïve Bayes Classifier, etc. • Classification techniques are most suited for predicting data sets with binary or nominal categories. They are less effective for ordinal categories since they do not consider the implicit order among the categories. Classification techniques
  • 7. Following are the examples of cases where the data analysis task is Classification • A bank loan officer wants to analyze the data in order to know which customer (loan applicant) are risky or which are safe. • A marketing manager at a company needs to analyze a customer with a given profile, who will buy a new computer. • In both of the above examples, a model or classifier is constructed to predict the categorical labels. These labels are risky or safe for loan application data and yes or no for marketing data. Example of Classification
  • 8. •A basic algorithm for learning decision trees is as below. •During tree construction, attribute selection measures are used to select the attribute that best partitions the tuples into distinct classes. •When decision trees are built, many of the branches may reflect noise or outliers in the training data. •Tree pruning attempts to identify and remove such branches, with the goal of improving classification accuracy on unseen data. DECISION TREE
  • 9. • Classification and Regression algorithm • Twoig • Gini • Entropy-based algorithm • ID3 • C4.5 • Construction of a decision tree is possible in two ways: Based on the training data Top-Down strategy Down strategy DECISION TREE
  • 10. Example to generate decision tree The data set has five attributes. ► There is a special attribute: the attribute class is the class label. ► The attributes, temp (temperature) and humidity are numerical Attributes ► Other attributes are categorical, that is, they cannot be ordered. ► Based on the training data set, we want to find a set of rules to know what values of outlook, temperature, humidity and wind, determine whether or not to play Tennis. From the given sample data we can observe that Outlook= {Sunny , Overcast , Rain} Temperature= {Hot , Mild , cool} Humidity={ High , Normal} Wind speed = {Weak , Strong } 10 ClassTraining data set for Play Golf Day Outlook Temp Humidity Wind speed Play ball 1 Rainy Hot High False No 2 Rainy Hot High True No 3 Overcast Hot High False Yes 4 Sunny Mild High False Yes 5 Sunny Cool Normal False Yes 6 Sunny Cool Normal True No 7 Overcast Cool Normal True Yes 8 Rainy Mild High False No 9 Rainy Cool Normal False Yes 10 Sunny Mild Normal False Yes 11 Rainy Mild Normal Strong Yes 12 Overcast Mild High True Yes 13 Overcast Hot Normal False Yes 14 Sunny Mild High True No
  • 11. • Consider the following training data set. • There are three attributes, namely, age, pin code and class. • The attribute class is used for class label. The attribute age is a numeric attribute, whereas pin code is a categorical one. Though the domain of pin code is numeric, no ordering can be define d among pin code values. You cannot derive any useful information if one pin-code is greater than another pin code. Concept of Categorical Attributes ID AGE PINCODE CLASS 1 30 395003 C1 2 25 395003 C1 3 21 395013 C2 4 43 395003 C1 5 18 395013 C2 6 33 395013 C1 7 29 395013 C1 8 55 395003 C2 9 48 395003 C1 Another Example
  • 12. Figuregivesadecisiontreeforthetraining datatrainingdata. Thesplittingattributeattherootispincode andthesplittingcriterionandthesplitting criterionhereispincode=395003. Similarly,fortheleftchildnode,thesplitting criterionisage<48(thesplittingattributeis age). Althoughtherightchildnodehasthesame attributeasthesplittingattribute,the splittingcriterionisdifferent. Pincode = 395003 {1-9} Age <=48; [1,2,4,8,9] C2:8C1: [1,2,4,9] Age <=21; [3,5,6,7] C1 : [6,7]C2:[3,5] Atrootlevel,wehave9records.Theassociated splittingcriterionis pincode=395003. Asaresult,wesplittherecordsintotwosubsets. Records1,2,4,8,and9aretotheleftchildnote andremainingtotherightnode. Theprocessisrepeatedateverynode.
  • 13. • Invented by J.Ross Quinlan in 1975. • Each node corresponds to a splitting attribute • Each arc is a possible value of that attribute. • At each node the splitting attribute is selected to be the most informative among the attributes not yet considered in the path from the root. • Entropy is used to measure how informative is a node. Iterative Dichotomizer 3 (ID3)
  • 14. • Used to generate a decision tree from a given data set by employing a top-down, greedy search, to test each attribute at every node of the tree. • The resulting tree is used to classify future samples. ID3 (Iterative Dichotomiser 3): Basic Idea
  • 15. • Entropy, as it relates to machine learning, is a measure of the randomness in the information being processed. • The higher the entropy, the harder it is to draw any conclusions from that information. • Flipping a coin is an example of an action that provides information that is random. For a coin that has no affinity for 'heads' or 'tails', the outcome of any number of tosses is difficult to predict. Why? • Because there is no relationship between flipping, and the outcome. This is the essence of entropy. What is entropy in decision tree ?
  • 16. Entropy  In order to define information gain precisely, we need to discuss entropy first.  A formula to calculate the homogeneity of a sample.  A completely homogeneous sample has entropy of 0 (leaf node).  An equally divided sample has entropy of 1.  The formula for entropy is:  where p(I) is the proportion of S belonging to class I.  ∑ is over total outcomes. Log2 is log base 2. Entropy(S) = -p(I) log2 p(I)<=1
  • 17. Example for understand Entropy : Example 1  If S is a collection of 14 examples with 9 YES and 5 NO examples then  Entropy(S) = - (9/14) Log2 (9/14) - (5/14) Log2 (5/14) = 0.940 A collection S consists of 20 data examples: 13 Yes : 7 No Entropy(S) = – (13/20) Log2(13/20)– (7/20) Log2(7/20) Entropy(S) = 0.934
  • 18. • Informationgainistheamountofinformationthat'sgainedbyknowingthe valueoftheattribute,whichistheentropyofthedistributionbeforethesplit minustheentropyofthedistributionafterit.Thelargestinformationgainis equivalenttothesmallestentropy. What is information gain in data mining? Play Golf Yes No Outlook Sunny 3 2 5 Overcast 4 0 4 Rainy 2 3 5 14 E(PlayGolf,outlook) = P(Sunny)*E(3,2) + P(Overcast)*E(4,0)+P(Rainy)*E(2,3) = (5/14)*0.971 +(4/14)*0.0 +(5/14)*0.971 =0.693
  • 19. Movie Example Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True 2 United States No Comedy False 3 United States Yes Comedy True 4 India No Comedy True 5 India Yes Science Fiction False 6 India Yes Romance False 7 Rest of World Yes Comedy False 8 Rest of World No Science Fiction False 9 India Yes Comedy True 10 United States Yes Comedy True
  • 20. Entropy ofTable Is the Film a Success? Entropy(5 Yes, 5 No) = –[ (5/10) Log2(5/10) + (5/10) Log2(5/10)] Entropy(Success) = 1
  • 21. Split – Country of Origin Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True 2 United States No Comedy False 3 United States Yes Comedy True 4 United States Yes Comedy True Film Country of Origin Big Star Genre Success 1 India No Comedy True 2 India Yes Science Fiction False 3 India Yes Romance False 4 India Yes Comedy True Film Country of Origin Big Star Genre Success 1 Rest of World Yes Comedy False 2 Rest of World No Science Fiction False
  • 22. Gain – Country of Origin Where is the film from? Entropy(USA) = – (3/4) Log2(3/4) – (1/4) Log2(1/4) Entropy(USA) = 0.811 Entropy(India) = – (2/4) Log2(2/4) – (2/4) Log2(2/4) Entropy(India) = 1 Entropy(Rest of World) = – (0/2) Log2(0/2) – (2/2) Log2(2/2) Entropy(Rest of World) = 0 Gain(Origin) = 1 – (4/10 *0.811 + 4/10*1 + 2/10*0) = 0.276
  • 23. Split – Big Star Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True 2 United States Yes Comedy True 3 India Yes Science Fiction False 4 India Yes Romance False 5 Rest of World Yes Comedy False 6 India Yes Comedy True 7 United States Yes Comedy True Film Country of Origin Big Star Genre Success 1 United States No Comedy False 2 India No Comedy True 3 Rest of World No Science Fiction False
  • 24. Gain – Big Star Is there a Big Star in the film? Entropy(Yes) = – (4/7) Log2(4/7) – (3/7) Log2(3/7) Entropy(Yes) = 0.985 Entropy(No) = – (1/3) Log2(1/3) – (2/3) Log2(2/3) Entropy(No) = 0.918 Gain(Star) = 1 – (7/10 *0.985 + 3/10*0.918) = 0.0351
  • 25. Split – Genre Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True 2 India Yes Science Fiction False 3 Rest of World No Science Fiction False Film Country of Origin Big Star Genre Success 1 United States No Comedy False 2 United States Yes Comedy True 3 India No Comedy True 4 Rest of World Yes Comedy False 5 India Yes Comedy True 6 United States Yes Comedy True Film Country of Origin Big Star Genre Success 1 India Yes Romance False
  • 26. Gain – Genre What genre is the film? Entropy(SciFi) = – (1/3) Log2(1/3) – (2/3) Log2(2/3) Entropy(SciFi) = 0.918 Entropy(Com) = – (4/6) Log2(4/6) – (2/6) Log2(2/6) Entropy(Com) = 0.918 Entropy(Rom) = – (0/1) Log2(0/1) – (1/1) Log2(1/1) Entropy(Rom) = 0 Gain(Genre) = 1 – (3/10 *0.918 + 6/10*0.918+ 1/10*0) = 0.1738
  • 27. Compare Gains… Gain(Origin) = 0.276 Gain(Star) = 0.0351 Gain(Genre) = 0.1738 Gain(Origin) = 0.276 Gain(Star) = 0.0351 Gain(Genre) = 0.1738 First Split: Origin
  • 29. All Movies NewTable United States India Rest of World NewTable NewTable
  • 30. NewTable – United States Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True 2 United States No Comedy False 3 United States Yes Comedy True 4 United States Yes Comedy True Entropy(3Yes, 1 No) = – (3/4) Log2(3/4) – (1/4) Log2(1/4) Entropy(Success) = 0.811
  • 31. Split – Big Star Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True 2 United States Yes Comedy True 3 United States Yes Comedy True Film Country of Origin Big Star Genre Success 1 United States No Comedy False
  • 32. Gain – Big Star Is there a Big Star in the film? Entropy(Yes) = – (3/3) Log2(3/3) – (0/3) Log2(0/3) Entropy(Yes) = 0 Entropy(No) = – (0/1) Log2(0/1) – (1/1) Log2(1/1) Entropy(No) = 0 Gain(Star) = 0.811 – (3/4 *0 + 1/4*0) = 0.811
  • 33. Split – Genre Film Country of Origin Big Star Genre Success 1 United States Yes Science Fiction True Film Country of Origin Big Star Genre Success 1 United States No Comedy False 2 United States Yes Comedy True 3 United States Yes Comedy True
  • 34. Gain – Genre What genre is the film? Entropy(SciFi) = – (1/1) Log2(1/1) – (0/1) Log2(0/1) Entropy(SciFi) = 0 Entropy(Com) = – (2/3) Log2(2/3) – (1/3) Log2(1/3) Entropy(Com) = 0.918 Gain(Genre) = 0.811 – (1/4 *0 + 3/4*0.918) = 0.1225
  • 35. Compare Gains… Gain(Star) = 0.811 Gain(Genre) = 0.1225 Gain(Star) = 0.811 Gain(Genre) = 0.1225 Split: Star
  • 36. All Movies United States India Rest of World NewTable NewTableTable Star No Star NewTable NewTable
  • 37. All Movies United States India Rest of World NewTable NewTableTable Star No Star Table Failure Sci-Fi Comedy Success Success
  • 38. All Movies United States India Rest of World Table Table Table Star No Star Table Failure Sci-Fi Comedy Success Success Star No Star Table Success Sci-Fi Comedy Success Success
  • 39. All Movies United States India Rest of World Table Table Table Star No Star NewTable Failure Sci-Fi Comedy Success Success Star No Star NewTable Success Sci-Fi Comedy Success Success Comedy from the India, with a big star…
  • 40. Day Outlook Temp Humidity Wind speed Play ball 1 Rainy Hot High False No 2 Rainy Hot High True No 3 Overcast Hot High False Yes 4 Sunny Mild High False Yes 5 Sunny Cool Normal False Yes 6 Sunny Cool Normal True No 7 Overcast Cool Normal True Yes 8 Rainy Mild High False No 9 Rainy Cool Normal False Yes 10 Sunny Mild Normal False Yes 11 Rainy Mild Normal Strong Yes 12 Overcast Mild High True Yes 13 Overcast Hot Normal False Yes 14 Sunny Mild High True No SolutionTraining data set for Play Golf
  • 41. Step 1: Calculate entropy of the target. Entropy(Play Golf) = Entropy( Nos_of_No , Nos_of_Yes ) = Entropy(5,9) = Entropy(0.36 , 0.64) = – (0.36) Log2 (0.36) – (0.64) Log2 (0.64) = 0.94 Entropy(Play Golf) = 0.94
  • 42. Step 2: The dataset is then split on the different attributes. The entropy for each branch is calculated. Then it is added proportionally, to get total entropy for the split. The resulting entropy is subtracted from the entropy before the split. The result is the Information Gain, or decrease in entropy. Play Golf Yes No Outlook Sunny 3 2 Overcast 4 0 Rainy 2 3 Gain=0.247 Play Golf Yes No Temp. Hot 2 2 Mild 4 2 Cool 3 1 Gain=0.029 Play Golf Yes No Humidity High 3 4 Normal 6 1 Gain=0.152 Play Golf Yes No Windy False 6 2 True 3 3 Gain=0.048 Gain(T,X) = Entropy(T) -Entropy(x) G(Play Golf , Outlook) = Entropy(Play Golf)- Entropy(Play Golf , Outlook) = 0.940-0.693 = 0.247
  • 43. Step 3: Choose attribute with the largest information gain as the decision node, divide the dataset by its branches and repeat the same process on every branch. Play Golf Yes No Outlook Sunny 3 2 Overcast 4 0 Rainy 2 3 Gain=0.247 Outlook SunnyOvercastRainy Outlook Temp Humidity Windy Play Golf Sunny Mild High False Yes Sunny Cool Normal False Yes Sunny Cool Normal True No Sunny Mild Normal False Yes Sunny Mild High True No Outlook Temp Humidity Windy Play Golf Overcast Hot High False Yes Overcast Cool Normal True Yes Overcast Mild High True Yes Overcast Hot Normal False Yes Outlook Temp Humidity Windy Play Golf Rainy Hot High False No Rainy Hot High True No Rainy Mild High True Yes Rainy Cool Normal False Yes Rainy Mild Normal True Yes
  • 44. Step 4a: A branch with entropy of 0 is a leaf node. Temp Humidity Windy Play Golf Hot High False Yes Cool Normal True Yes Mild High True Yes Hot Normal False Yes Outlook Sunny Overcast Rainy Play= Yes
  • 45. Step 4b: A branch with entropy more than 0 needs further splitting. Temp Humidity Windy Play Golf Mild High False Yes Cool Normal False Yes Cool Normal True No Mild Normal False Yes Mild High True No Outlook Sunny Overcast Rain Windy Yes TrueFalse NoYes Step 5: The ID3 algorithm is run recursively on the non-leaf branches, until all data is classified.
  • 46. Decision Tree to Decision Rules A decision tree can easily be transformed to a set of rules by mapping from the root node to the leaf nodes one by one. Therefore the final decision tree is Outlook RainyOvercastSunny HumidityWind speed Yes HighNormal NoYes False True Yes No
  • 47. • A decision tree construction process is concerned with identifying the splitting attributes an d splitting criterion at every level o f t he tree. • Major strengths are: • Decision tree able to generate understandable rules. • They are able to handle both numerical and categorical attributes. • They provide clear indication of which fields are most important for prediction or classification prediction or classification. • Weaknesses are: • The process of growing a decision tree is computationally expensive. • AtThe process of growing a decision tree is computationally expensive. At each node, each candidate splitting field is examined before its best split can be found. • Some decision tree can only deal with binary-valued target classes. Advantages and Shortcomings of Decision Tree Classifications
  • 48. DECISIONTREE APPLICATIONS • Business Management In the past decades, many organizations had created their own databases to enhance their customer services. Decision trees are a possible way to extract useful information from databases and they have already been employed in many applications in the domain of business and management. In particular, decision tree modelling is widely used in customer relationship management and fraud detection, which are presented in subsections below. • Customer Relationship Management : A frequently used approach to manage customers’ relationships is to investigate how individuals access online services. Such an investigation is mainly performed by collecting and analyzing individuals’ usage data and then providing recommendations based on the extracted information. • Fraudulent Statement Detection :Another widely used business application is the detection of Fraudulent Financial Statements (FFS) • Engineering : The other important application domain that decision trees can support is engineering. In particular, decision trees are widely used in energy consumption and fault diagnosis, which are described in subsections below. • Energy Consumption : Energy consumption concerns how much electricity has been used by individuals. The investigation of energy consumption becomes an important issue as it helps utility companies identify the amount of energy needed. • Fault Diagnosis : Another widely used application in the engineering domain is the detection of faults, especially in the identification of a faulty bearing in rotary machineries. • Healthcare Management: As decision tree modelling can be used for making predictions, there are an increasing number of studies that investigate to use decision trees in health-care management. 48
  • 49. Conclusion  The decision tree method is a powerful statistical tool for classification, prediction, interpretation, and data manipulation that has several potential applications in medical research. Using decision tree models to describe research findings has the following advantages:  • Simplifies complex relationships between input variables and target variables by dividing original input variables into significant subgroups.  • Easy to understand and interpret.  • Non-parametric approach without distributional assumptions.  • Easy to handle missing values without needing to resort to imputation.  • Easy to handle heavy skewed data without needing to resort to data transformation.  • Robust to outliers. -