W6 Lab
W6 Lab
Assignment-6
Course-B. Tech. Type- Core
Course Code- CSET 301 Course Name-Artificial Intelligence and
Machine Learning
Year- 2024 Semester- Even
Date- 19/02/2024 –23/02/2024 Batch-
CO-Mapping
CO1 CO2 CO3
Q1 √ √
Q2 √ √
Objectives (Q1)
To understand the process of constructing a decision tree using the ID3 algorithm and apply it to a given
dataset.
Question 1:
Consider a dataset representing student admissions to a university.
• The dataset contains the following attributes:
• High School GPA (numeric)
• SAT Score (numeric)
• Extracurricular Activities (categorical: Yes/No)
• Recommendation Letter Strength (categorical: Weak/Strong)
• Admission Status (categorical: Admitted/Not Admitted)
Dataset:
a) Write a python program using the ID3 algorithm, illustrate the step-by-step construction of a decision
tree for predicting "Admission Status" based on the provided dataset. Clearly show the selection of
attributes at each step, the calculation of information gain, and the resulting decision tree.
School of Computer Science Engineering and Technology
High School GPA SAT Score Extracurricular Activities Recommendation Letter Strength
3.5 1350 Yes Weak
Objectives (Question 2)
To understand the process of constructing a decision tree using the CART algorithm and apply it to a given
dataset above in question 1.
a) Write a python program using the CART algorithm for dataset given in question no 1, illustrate the
step-by-step construction of a decision tree for predicting "Admission Status" based on the provided
dataset. Clearly show the selection of attributes at each step, the calculation of information gain,
and the resulting decision tree.