Decision Tree
Assignment Questions
Theoretical
What is a Decision Tree, and how does it work
What are impurity measures in Decision Trees
What is the mathematical formula for Gini Impurity
What is the mathematical formula for Entropy
What is Information Gain, and how is it used in Decision Trees
What is the difference between Gini Impurity and Entropy
What is the mathematical explanation behind Decision Trees
What is Pre-Pruning in Decision Trees
What is Post-Pruning in Decision Trees
What is the difference between Pre-Pruning and Post-Pruning
What is a Decision Tree Regressor
What are the advantages and disadvantages of Decision Trees
How does a Decision Tree handle missing values
How does a Decision Tree handle categorical features
What are some real-world applications of Decision Trees?
Practical
Write a Python program to train a Decision Tree Classifier on the Iris dataset and print the model accuracy
Write a Python program to train a Decision Tree Classifier using Gini Impurity as the criterion and print the
feature importances
Write a Python program to train a Decision Tree Classifier using Entropy as the splitting criterion and print the
model accuracy
Write a Python program to train a Decision Tree Regressor on a housing dataset and evaluate using Mean
Squared Error (MSE)
Write a Python program to train a Decision Tree Classifier and visualize the tree using graphviz
Write a Python program to train a Decision Tree Classifier with a maximum depth of 3 and compare its
accuracy with a fully grown tree
Write a Python program to train a Decision Tree Classifier using min_samples_split=5 and compare its
accuracy with a default tree
Write a Python program to apply feature scaling before training a Decision Tree Classifier and compare its
accuracy with unscaled data
Write a Python program to train a Decision Tree Classifier using One-vs-Rest (OvR) strategy for multiclass
classification
Write a Python program to train a Decision Tree Classifier and display the feature importance scores
Write a Python program to train a Decision Tree Regressor with max_depth=5 and compare its performance
with an unrestricted tree
Write a Python program to train a Decision Tree Classifier, apply Cost Complexity Pruning (CCP), and
visualize its effect on accuracy
Write a Python program to train a Decision Tree Classifier and evaluate its performance using Precision,
Recall, and F1-Score
Write a Python program to train a Decision Tree Classifier and visualize the confusion matrix using seaborn
Write a Python program to train a Decision Tree Classifier and use GridSearchCV to find the optimal values
for max_depth and min_samples_split.