Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

DSS Unit 6 Notes – Decision Tree, Random Forest & Bagging (Full Explanation with Examples)

Rating
-
Sold
-
Pages
9
Grade
A
Uploaded on
27-11-2025
Written in
2025/2026

These DSS Unit 6 notes provide a complete and easy-to-understand explanation of Decision Trees, Random Forest Algorithm, and Bagging (Bootstrap Aggregating). The document includes clear definitions, working steps, mathematical concepts (Entropy, Information Gain, Gini Index), ID3 algorithm, examples, advantages, disadvantages, and applications.

Show more Read less
Institution
Course

Content preview

DSS-Unit 6

Q1.Explain decision trees in detail with example.
Ans-Introduction

A Decision Tree is one of the most popular and powerful algorithms used in machine learning and data
analysis. It is a tree-structured model that is used for classification and regression tasks. The structure of
the decision tree is very similar to a tree data structure used in programming. It consists of nodes, branches,
and leaves.

The topmost node of the tree is called the Root Node, which represents the entire dataset and is divided into
two or more homogeneous sets. The internal nodes represent tests on attributes, each branch represents an
outcome of a test, and the leaf nodes represent the final decision or output.

Concept of Decision Tree

In a Decision Tree:

1.Each internal node represents a condition or test on an attribute.

2.Each branch represents the result of the test.

3.Each leaf node represents a class label or output.

The final goal of the Decision Tree algorithm is to create a model that predicts the value of a target variable
by learning simple decision rules inferred from data features.

It is a Supervised Learning Algorithm, meaning it requires labeled input data (training data) to learn from.

Working of a Decision Tree Algorithm

The Decision Tree algorithm works in a top-down approach, known as recursive partitioning. The
algorithm chooses an attribute that best splits the data into different classes. This process is repeated
recursively for each sub-dataset.

Step-by-Step Working:

1.Start with the entire dataset as the root node.

2.Select the best attribute using statistical measures such as:

 Entropy
 Information Gain
 Gini Index

3. Split the dataset into subsets based on the chosen attribute.
4. Repeat the process for each subset until:

 All records in a subset belong to the same class, or
 No remaining attributes are left to split.

5.The final nodes are the leaf nodes, which represent the classification result.

VG note Page 1

, Mathematical Concepts Used

1. Entropy:
It measures the impurity or disorder in the dataset.

Formula:Entropy=−∑pilog2(pi)

 where pi is the probability of each class in the dataset.

 Lower Entropy ⇒ Higher purity.

2.Information Gain:
It measures how much information an attribute gives us about the class.

Formula:IG=Entropy(parent)−∑ni/n ×Entropy(i)

The attribute with the highest information gain is chosen for splitting.

3.Gini Index:
It is another measure of impurity used in classification tasks.

Formula:Gini=1−∑pi2​

Algorithm Used: ID3 Algorithm

One of the most commonly used algorithms for constructing a decision tree is ID3 (Iterative Dichotomiser
3).

Steps in ID3:

2. Begin with the original dataset as the root node.
3. For each attribute, calculate Entropy and Information Gain.
4. Select the attribute with the highest Information Gain.
5. Split the dataset based on that attribute.
6. Repeat recursively until all data is classified.

Example:=Let us consider a simple example of predicting whether a person will play cricket based on
weather conditions.


Weather Temperature Play Cricket
Sunny Hot No
Sunny Mild No

Cool Yes
Overcast
Rainy Mild Yes
Rainy Cool Yes



VG note Page 2

Written for

Institution
Course

Document information

Uploaded on
November 27, 2025
Number of pages
9
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$3.59
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
vedikagavhane

Get to know the seller

Seller avatar
vedikagavhane Sipna College Of Engineering and Technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
5 months
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions