0
0
ML Pythonprogramming~5 mins

Decision tree classifier in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Decision Tree Classifier?
A Decision Tree Classifier is a simple model that splits data into branches based on questions about features, helping to classify data into categories.
Click to reveal answer
beginner
What does each node in a decision tree represent?
Each node represents a question or test on a feature that splits the data into groups to help decide the final class.
Click to reveal answer
intermediate
How does a decision tree decide where to split the data?
It chooses splits that best separate the classes, often using measures like Gini impurity or entropy to find the most informative questions.
Click to reveal answer
intermediate
What is overfitting in decision trees and how can it be prevented?
Overfitting happens when the tree is too complex and fits noise, not just patterns. It can be prevented by limiting tree depth, requiring a minimum number of samples to split, or pruning.
Click to reveal answer
beginner
What is the output of a decision tree classifier?
The output is the predicted class label for a given input, based on the path through the tree from root to a leaf node.
Click to reveal answer
What does a leaf node in a decision tree represent?
AA final class prediction
BA question about a feature
CA data split point
DAn error in the model
Which measure is commonly used to decide the best split in a decision tree?
AGini impurity
BMean squared error
CEuclidean distance
DCosine similarity
What problem occurs if a decision tree is too deep?
AUnderfitting
BFaster training
COverfitting
DLess accuracy
How can you reduce overfitting in decision trees?
AIncrease tree depth
BUse more features
CIgnore data cleaning
DLimit tree depth
What type of problems is a decision tree classifier used for?
ARegression problems
BClassification problems
CClustering problems
DDimensionality reduction
Explain how a decision tree classifier makes predictions from input data.
Describe two ways to prevent overfitting in decision tree classifiers.