Decision Trees Quiz
Decision Trees Quiz
Section titled “Decision Trees Quiz”Question 1
Section titled “Question 1”Based on the decision tree shown in the lecture, if an animal has floppy ears, a round face shape and has whiskers, does the model predict that it’s a cat or not a cat?
- cat ✓
- Not a cat
Answer Location: Following the decision tree path - floppy ears leads to right branch, round face leads to left sub-branch, whiskers present leads to “Cat” prediction.
Question 2
Section titled “Question 2”Take a decision tree learning to classify between spam and non-spam email. There are 20 training examples at the root note, comprising 10 spam and 10 non-spam emails. If the algorithm can choose from among four features, resulting in four corresponding splits, which would it choose (i.e., which has highest purity)?
- Left split: 7 of 8 emails are spam. Right split: 3 of 12 emails are spam.
- Left split: 2 of 2 emails are spam. Right split: 8 of 18 emails are spam.
- Left split: 10 of 10 emails are spam. Right split: 0 of 10 emails are spam. ✓
- Left split: 5 of 10 emails are spam. Right split: 5 of 10 emails are spam.
Answer Location: Found in Section 2: The algorithm chooses splits that “maximize purity” - the third option creates perfectly pure nodes (100% spam and 0% spam), which is the highest possible purity.