Unit-3
Machine Learning Techniques
KCS055
Decision Tree Learning and Instance-Based Learning
DECISION TREE LEARNING
• Decision tree learning is one of the most widely used and practical
methods for inductive inference. It is a method for approximating
discrete-valued functions that is robust to noisy data and capable of
learning disjunctive expressions.
• Decision tree learning is a method for approximating discrete-valued
target functions, in which the learned function is represented by a
decision tree. Learned trees can also be re-represented as sets of ifthen rules to improve human readability. These learning methods are
among the most popular of inductive inference algorithms and have
been successfully applied to a broad range of tasks from learning to
diagnose medical cases to learning to assess credit risk of loan
applicants.
Decision Tree Introduction
• Classification is a two-step process, learning step and prediction step, in
machine learning. In the learning step, the model is developed based on given
training data. In the prediction step, the model is used to predict the response
for given data. Decision Tree is one of the easiest and popular classification
algorithms to understand and interpret.
• Decision Tree algorithm belongs to the family of supervised learning
algorithms. Unlike other supervised learning algorithms, decision tree
algorithm can be used for solving regression and classification problems too.
Decision Tree
• A decision tree is a flowchart-like structure in which each internal
node represents a test on a feature (e.g. whether a coin flip comes up
heads or tails) , each leaf node represents a class label (decision taken
after computing all features) and branches represent conjunctions of
features that lead to those class labels.
• The paths from root to leaf represent classification rules. Below
diagram illustrate the basic flow of decision tree for decision making
with labels (Rain(Yes), No Rain(No)).
Figure
Decision Tree
• 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.
• In a Decision tree, there are two nodes, which are the Decision
Node and Leaf Node. Decision nodes are used to make any
decision and have multiple branches, whereas Leaf nodes are the
output of those decisions and do not contain any further branches.
• The decisions or the test are performed on the basis of features of
the given dataset.
• It is called a decision tree because, similar to a tree, it starts with the
root node, which expands on further branches and constructs a tree-like structure.
• Below diagram explains the general
structure of a decision tree:
• Note: A decision tree can contain categorical data (YES/NO) as
well as numeric data.
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 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 REPRESENTATION
• Decision trees classify instances by sorting them down the tree from
the root to some leaf node, which provides the classification of the
instance. Each node in the tree specifies a test of some attribute of
the instance, and each branch descending from that node
corresponds to one of the possible values for this attribute. An
instance is classified by starting at the root node of the tree, testing
the attribute specified by this node, then moving down the tree
branch corresponding to the value of the attribute in the given
example. This process is then repeated for the subtree rooted at the
new node.
Figure 3.1 illustrates a typical learned decision
tree
• This decision tree classifies Saturday mornings according to whether
they are suitable for playing tennis. For example, the instance
(Outlook = Sunny, Temperature = Hot, Humidity = High, Wind =
0 Comments