The document discusses decision tree models in machine learning. It begins by defining key terms like decision nodes, branches, and leaf nodes. It then explains how decision trees are built in a top-down manner by recursively splitting the training data based on selected attributes. The document also covers different algorithms for building decision trees like ID3, C4.5, and CART. It discusses measures used for attribute selection like information gain, gain ratio, and Gini index. Finally, it provides an example of how to build a decision tree to classify whether to play tennis based on weather attributes.
Decision tree in artificial intelligenceMdAlAmin187
Decision tree.
Decision Tree that based on artificial intelligence. The main ideas behind Decision Trees were invented more than 70 years ago, and nowadays they are among the most powerful Machine Learning tools.
This presentation was prepared as part of the curriculum studies for CSCI-659 Topics in Artificial Intelligence Course - Machine Learning in Computational Linguistics.
It was prepared under guidance of Prof. Sandra Kubler.
Decision tree is a type of supervised learning algorithm (having a pre-defined target variable) that is mostly used in classification problems. It is a tree in which each branch node represents a choice between a number of alternatives, and each leaf node represents a decision.
Decision tree in artificial intelligenceMdAlAmin187
Decision tree.
Decision Tree that based on artificial intelligence. The main ideas behind Decision Trees were invented more than 70 years ago, and nowadays they are among the most powerful Machine Learning tools.
This presentation was prepared as part of the curriculum studies for CSCI-659 Topics in Artificial Intelligence Course - Machine Learning in Computational Linguistics.
It was prepared under guidance of Prof. Sandra Kubler.
Decision tree is a type of supervised learning algorithm (having a pre-defined target variable) that is mostly used in classification problems. It is a tree in which each branch node represents a choice between a number of alternatives, and each leaf node represents a decision.
This is the most simplest and easy to understand ppt. Here you can define what is decision tree,information gain,gini impurity,steps for making decision tree there pros and cons etc which will helps you to easy understand and represent it.
Decision Tree Algorithm | Decision Tree in Python | Machine Learning Algorith...Edureka!
** Machine Learning with Python : https://www.edureka.co/machine-learning-certification-training **
This Edureka tutorial on Decision Tree Algorithm in Python will take you through the fundamentals of decision tree machine learning algorithm concepts and its demo in Python. Below are the topics covered in this tutorial:
1. What is Classification?
2. Types of Classification
3. Classification Use Case
4. What is Decision Tree?
5. Decision Tree Terminology
6. Visualizing a Decision Tree
7 Writing a Decision Tree Classifier fro Scratch in Python using CART Algorithm
Check out our Python Machine Learning Playlist: https://goo.gl/UxjTxm
Efficient classification of big data using vfdt (very fast decision tree)eSAT Journals
Abstract
Decision Tree learning algorithms have been able to capture knowledge successfully. Decision Trees are best considered when
instances are described by attribute-value pairs and when the target function has a discrete value. The main task of these
decision trees is to use inductive methods to the given values of attributes of an unknown object and determine an
appropriate classification by applying decision tree rules. Decision Trees are very effective forms to evaluate the performance
and represent the algorithms because of their robustness, simplicity, capability of handling numerical and categorical data,
ability to work with large datasets and comprehensibility to a name a few. There are various decision tree algorithms available
like ID3, CART, C4.5, VFDT, QUEST, CTREE, GUIDE, CHAID, CRUISE, etc. In this paper a comparative study on three of
these popular decision tree algorithms - (Iterative Dichotomizer 3), C4.5 which is an evolution of ID3 and VFDT (Very
Fast Decision Tree has been made. An empirical study has been conducted to compare C4.5 and VFDT in terms of accuracy
and execution time and various conclusions have been drawn.
Key Words: Decision tree, ID3, C4.5, VFDT, Information Gain, Gain Ratio, Gini Index, Over−fitting.
This is the most simplest and easy to understand ppt. Here you can define what is decision tree,information gain,gini impurity,steps for making decision tree there pros and cons etc which will helps you to easy understand and represent it.
Decision Tree Algorithm | Decision Tree in Python | Machine Learning Algorith...Edureka!
** Machine Learning with Python : https://www.edureka.co/machine-learning-certification-training **
This Edureka tutorial on Decision Tree Algorithm in Python will take you through the fundamentals of decision tree machine learning algorithm concepts and its demo in Python. Below are the topics covered in this tutorial:
1. What is Classification?
2. Types of Classification
3. Classification Use Case
4. What is Decision Tree?
5. Decision Tree Terminology
6. Visualizing a Decision Tree
7 Writing a Decision Tree Classifier fro Scratch in Python using CART Algorithm
Check out our Python Machine Learning Playlist: https://goo.gl/UxjTxm
Efficient classification of big data using vfdt (very fast decision tree)eSAT Journals
Abstract
Decision Tree learning algorithms have been able to capture knowledge successfully. Decision Trees are best considered when
instances are described by attribute-value pairs and when the target function has a discrete value. The main task of these
decision trees is to use inductive methods to the given values of attributes of an unknown object and determine an
appropriate classification by applying decision tree rules. Decision Trees are very effective forms to evaluate the performance
and represent the algorithms because of their robustness, simplicity, capability of handling numerical and categorical data,
ability to work with large datasets and comprehensibility to a name a few. There are various decision tree algorithms available
like ID3, CART, C4.5, VFDT, QUEST, CTREE, GUIDE, CHAID, CRUISE, etc. In this paper a comparative study on three of
these popular decision tree algorithms - (Iterative Dichotomizer 3), C4.5 which is an evolution of ID3 and VFDT (Very
Fast Decision Tree has been made. An empirical study has been conducted to compare C4.5 and VFDT in terms of accuracy
and execution time and various conclusions have been drawn.
Key Words: Decision tree, ID3, C4.5, VFDT, Information Gain, Gain Ratio, Gini Index, Over−fitting.
Lecture 9 - Decision Trees and Ensemble Methods, a lecture in subject module ...Maninda Edirisooriya
Decision Trees and Ensemble Methods is a different form of Machine Learning algorithm classes. This was one of the lectures of a full course I taught in University of Moratuwa, Sri Lanka on 2023 second half of the year.
Classification Using Decision Trees and RulesChapter 5.docxmonicafrancis71118
Classification Using Decision
Trees and Rules
Chapter 5
Introduction
• Decision tree learners use a tree structure to model the relationships
among the features and the potential outcomes.
• a structure of branching decisions into a final predicted class value
• Decision begins at the root node, then passed through decision nodes
that require choices.
• Choices split the data across branches that indicate potential
outcomes of a decision
• Tree is terminated by leaf nodes that denote the action to be taken as
the result of the series of decisions.
Decision Tree Example
Benefits
• Flowchart-like tree structure is not necessarily exclusively for the
learner's internal use.
• Resulting structure in a human-readable format.
• Provides insight into how and why the model works or doesn't work well for a
particular task.
• Useful where classification mechanism needs to be transparent for legal reasons, or in
case the results need to be shared with others in order to inform future business
practices
• Credit scoring models where criteria that causes an applicant to be rejected need to be clearly
documented and free from bias
• Marketing studies of customer behavior such as satisfaction or churn, which will be shared
with management or advertising agencies
• Diagnosis of medical conditions based on laboratory measurements, symptoms, or the rate of
disease progression
Applicability
• Widely used machine learning technique
• Can be applied to model almost any type of data with excellent
results
• Does not fit task where the data has a large number of nominal
features with many levels or it has a large number of numeric
features.
• Result in large number of decisions and an overly complex tree.
• Tendency of decision trees to overfit data, though this can be overcome by
adjusting some simple parameters
Divide and Conquer
• Decision trees are built using a heuristic called recursive partitioning.
• Divide and conquer because it splits the data into subsets, which are then
split repeatedly into even smaller subsets,
• Stops when the data within the subsets are sufficiently homogenous, or
another stopping criterion has been met.
• Root node represents the entire dataset
• Algorithm must choose a feature to split upon
• Choose the feature most predictive of the target class.
• Algorithm continues to divide and conquer the data, choosing the best
candidate feature each time to create another decision node, until a stopping
criterion is reached.
Divide and Conquer
• Stopping Conditions
• All (or nearly all) of the examples at the node have the same class
• There are no remaining features to distinguish among the examples
• The tree has grown to a predefined size limit
Example
• Finding potential for a movie- Box Office Bust, Mainstream Hit, Critical Success
• Diagonal lines might have split the data even more cleanly.
• Limitation of the decision tree's knowledge representation, whi.
DCOM (Distributed Component Object Model) and CORBA (Common Object Request Broker Architecture) are two popular distributed object models. In this paper, we make architectural comparison of DCOM and CORBA at three different layers: basic programming architecture, remoting architecture, and the wire protocol architecture.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
1. Mathematics behind
Machine Learning:
Decision Tree Model
Dr Lotfi Ncib, Associate Professor Of applied mathematics Esprit School of Engineering
lotfi.ncib@esprit.tn
Disclaimer: Some of the Images and content have been taken from multiple online sources and this presentation is intended only for knowledge sharing but not
for any commercial business intention
2. 1
What is The difference between AI, ML and DL?
• Artificial Intelligence AI tries to make computers intelligent in order to mimic
the cognitive functions of humans. So, AI is a general field with a broad scope
including:
• Computer Vision,
• Language Processing,
• Creativity…
• Machine Learning ML is the branch of AI that covers the statistical part of
artificial intelligence. It teaches the computer to solve problems by looking at
hundreds or thousands of examples, learning from them, and then using that
experience to solve the same problem in new situations:
• Regression,
• Classification,
• Clustering…
• DL is a very special field of Machine Learning where computers can actually
learn and make intelligent decisions on their own,
• CNN
• RNN…
6. 5
What’s Decision Trees
Decision Trees (DTs) are a non-parametric supervised learning method used for classification and regression.
The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred
from the data features.
Advantages :
❖ Decision Trees are easy to explain. It results
in a set of rules.
❖ It follows the same approach as humans
generally follow while making decisions.
❖ Interpretation of a complex Decision Tree
model can be simplified by its visualizations.
Even a naive person can understand logic.
❖ The Number of hyper-parameters to be
tuned is almost null.
❖ There is a high probability of overfitting in
Decision Tree.
❖ Generally, it gives low prediction accuracy for a
dataset as compared to other machine learning
algorithms.
❖ Information gain in a decision tree with categorical
variables gives a biased response for attributes
with greater number of categories.
❖ Calculations can become complex when there are
many class labels.
Disadvantages :
8. 7
Decision Tree with its Terminologies
• decision node = test on an attribute
• branch = an outcome of the test
• leaf node = classification or decision
• root = the topmost decision node
• path: a disjunction of test to make the final
decision
Classification on new instances is done by following
a matching path from the root to a leaf node
9. 8
How to build a decision tree?
Top-down tree construction:
• all training data are the root
• data are partitioned recursively based on selected attributes
• bottom-up tree pruning
→ remove subtrees or branches, in a bottom-up manner,
to improve the estimated accuracy on new cases.
• conditions for stopping partitioning:
• all samples for a given node belong to the same class
• there are no remaining attributes for further partitioning
• there are no samples left
10. ❖ID3 (Iterative Dichotomiser 3) is an easy way of decision tree algorithm.
▪ The evaluation that used to build the tree is information gain for splitting criteria.
▪ The growth of tree stops when all samples have the same class or information gain is
not greater than zero. It fails with numeric attributes or missing values.
❖C4.5 is the ID3 improvement or extension It is a mixture of C4.5, C4.5-no-pruning, and C4.5-
rules.
▪ It uses Gain ratio as splitting criteria.
▪ It is an optimal choice with numeric attributes or missing values.
❖CART (Classification - regression tree): is the most popular algorithm in the statistical
community. In the fields of statistics, CART helps decision trees to gain credibility and
acceptance in additional to make binary splits on inputs to get the purpose.
9
There are several algorithms that used to build decision Trees CART, ID3, C4.5, and others.
Decision Trees algorithms
11. 10
Attribute selection measures
Many measures that can be used to determine the optimal direction to split the records as:
❖ Entropy It is a one of the information theory measurement; it detects the impurity of the data set. If the attribute takes
on c different values, then the entropy S related to c-wise classification is defined as equation below:
❖ Information gain It chooses any attribute is used for splitting a certain node. It prioritizes to nominate attributes
having large number of values by calculating the difference in entropy
❖ The gain ratio The information gain equation, G(T,X) is biased toward attributes that have a large number of values over
attributes that have a smaller number of values. These ‘Super Attributes’ will easily be selected as the root, resulted in a broad
tree that classifies perfectly but performs poorly on unseen instances. We can penalize attributes with large numbers of values
by using an alternative method for attribute selection, referred to as Gain Ratio.
𝐺 𝑆, 𝐴 = 𝐸 𝑆 − 𝐸(𝑆, 𝐴)
𝐺𝑎𝑖𝑛𝑅𝑎𝑡𝑖𝑜 𝑆, 𝐴 = 𝐺𝑎𝑖𝑛(𝑆, 𝐴)/𝑆𝑝𝑙𝑖𝑡(𝑆, 𝐴)
𝑆𝑝𝑙𝑖𝑡 𝑆, 𝐴 = −
𝑖=1
𝑛
𝑆𝑖
𝑆
𝑙𝑜𝑔2(
𝑆𝑖
𝑆
)
𝐸 𝑆 =
𝑖=1
𝑐
−𝑝𝑖 𝑙𝑜𝑔2(𝑝𝑖)
Entropy one attribute:
𝐸 𝑆, 𝐴 = −
𝑣𝜖𝐴
𝑆 𝑣
𝑆
𝐸(𝑆 𝑣)
Entropy of two attributes: S is a set of examples
12. 11
Attribute selection measures
Many measures that can be used to determine the optimal direction to split the records as:
❖ Gini Index is a metric to measure how often a randomly chosen element would be incorrectly identified. It means an
attribute with lower Gini index should be preferred.
Comparing Attribute Selection Measures
▪ Information Gain
• Biased towards multivalued attributes
▪ Gain Ratio
• Tends to prefer unbalanced splits in which one partition is much smaller than the other
▪ Gini Index
• Biased towards multivalued attributes ¤ Has difficulties when the number of classes is large
• Tends to favor tests that result in equal-sized partitions and purity in both partitions
13. 12
ID3 operates on whole training set S Algorithm:
1. create a new node
2. If current training set is sufficiently pure:
• Label node with respective class
• We’re done
3. Else:
• x ← the “best” decision attribute for current training set
• Assign x as decision attribute for node
• For each value of x, create new descendant of node
• Sort training examples to leaf nodes
• Iterate over new leaf nodes and apply algorithm recursively
ID3: Algorithm
15. 14
Entropy measures the impurity of S
S is a set of examples
p is the proportion of positive examples
q is the proportion of negative examples
Entropy(S) = - p log2 p - q log2 q
ID3: Entropy
18. 17
Outlook | No Yes
--------------------------------------------
Sunny | 3 2
--------------------------------------------
Overcast | 0 4
--------------------------------------------
Rainy | 2 3
Temp | No Yes
--------------------------------------------
Hot | 2 2
--------------------------------------------
Mild | 2 4
--------------------------------------------
Cool | 1 3
Humidity | No Yes
--------------------------------------------
High | 4 3
--------------------------------------------
Normal | 1 6
Windy | No Yes
--------------------------------------------
False | 2 6
--------------------------------------------
True | 3 3
Play
ID3: Frequency Tables
19. 18
ID3 Entropy: One Variable
5 / 14 = 0.369 / 14 = 0.64
NoYes
Play
Entropy(Play) = -p log2 p - q log2 q
= - (0.64 * log2 0.64) - (0.36 * log2 0.36)
= 0.94
Example:
Entropy(5,3,2) = - (0.5 * log2 0.5) - (0.3
* log2 0.3) - (0.2 * log2 0.2)= 1.49
So, entropy of whole system before we make our first question is 0.940
Now, we have four features to make decision and they are:
1.Outlook
2.Temperature
3.Windy
4.Humidity
20. 19
Outlook | No Yes
--------------------------------------------
Sunny | 3 2 | 5
--------------------------------------------
Overcast | 0 4 | 4
--------------------------------------------
Rainy | 2 3 | 5
--------------------------------------------
| 14
Size of the set
Size of the subset
E (Play,Outlook) = (5/14)*0.971 + (4/14)*0.0 + (5/14)*0.971
= 0.693
ID3 Entropy: two variables
21. 20
Gain(S, A) = E(S) – E(S, A)
Example:
Gain(Play,Outlook) = 0.940 – 0.693 = 0.247
Information Gain
26. 25
R1: IF (Outlook=Sunny) AND (Humidity=High) THEN Play=No
R2: IF (Outlook=Sunny) AND (Humidity=Normal) THEN Play=Yes
R3: IF (Outlook=Overcast) THEN Play=Yes
R4: IF (Outlook=Rainy) AND (Wind=true) THEN Play=No
R5: IF (Outlook=Rainy) AND (Wind=false) THEN Play=Yes
Outlook
Sunny Overcast Rainy
Humidity
High Normal
Wind
true false
No Yes
Yes
YesNo
Converting Tree to Rules
27. 26
Super Attributes
• The information gain equation, G(S,A) is biased toward
attributes that have a large number of values over
attributes that have a smaller number of values.
• Theses ‘Super Attributes’ will easily be selected as the
root, result in a broad tree that classifies perfectly but
performs poorly on unseen instances.
• We can penalize attributes with large numbers of values
by using an alternative method for attribute selection,
referred to as GainRatio(C4.5).
𝐺𝑎𝑖𝑛𝑅𝑎𝑡𝑖𝑜 𝑆, 𝐴 = 𝐺𝑎𝑖𝑛(𝑆, 𝐴)/𝑆𝑝𝑙𝑖𝑡(𝑆, 𝐴) 𝑆𝑝𝑙𝑖𝑡 𝑆, 𝐴 = −
𝑖=1
𝑛
𝑆𝑖
𝑆
𝑙𝑜𝑔2(
𝑆𝑖
𝑆
)
28. 27
||
||
log
||
||
),(
1
2
S
S
S
S
ASSplit i
n
i
i
=
−=
Outlook | No Yes
--------------------------------------------
Sunny | 3 2 | 5
--------------------------------------------
Overcast | 0 4 | 4
--------------------------------------------
Rainy | 2 3 | 5
--------------------------------------------
| 14
Split (Play, Outlook)= - (5/14*log2(5/14)+4/14*log2(4/15)+5/14*log2(5/14))
= 1.577
Gain (Play,Outlook) = 0.247
Gain Ratio (Play,Outlook) = 0.247/1.577 = 0.156
Super Attributes: Example
38. 37
Outlook
Sunny Overcast Rain
Humidity
High Normal
Wind
Strong Weak
30 45
50
5525
Outlook
Sunny Overcast Rain
Humidity
High Normal
Wind
Strong Weak
30 45
50
5525
Attribute Node
Value Node
Leaf Node
Decision Tree - Regression
39. 38
• are simple, quick and robust
• are non-parametric
• can handle complex datasets
• Decision trees work more efficiently with discrete
attributes
• can use any combination of categorical and
continuous variables and missing values
• sometimes are not easy to be read
• The trees may suffer from overfitting problem
• …
Decision Trees: