NCA-GENL Question 34
Single answerYou are tasked with training a machine learning model to classify customer reviews as positive or negative. Before training, you perform feature engineering and create three potential input features: (1) the length of the review, (2) the frequency of positive or negative sentiment words, and (3) the sentiment score from a pre-trained sentiment analysis model. To select the best model, you use cross-validation to evaluate three algorithms: logistic regression, decision trees, and a support vector machine (SVM). During evaluation, you notice that the decision tree performs exceptionally well on the training set but poorly on the validation set. What is the most likely explanation for this issue?
- A
The decision tree model is overfitting the training data.
- B
The features are not informative enough for the decision tree.
- C
The cross-validation process was not performed correctly.
- D
The decision tree is underfitting the training data.
Show answer and explanation
Correct answer: A
Explanation
The decision tree's strong performance on the training set but poor performance on the validation set indicates that it is overfitting. Overfitting occurs when a model learns patterns, including noise, that are specific to the training data but do not generalize to unseen data. This can be addressed by techniques such as pruning the decision tree, regularization, or using simpler models.
- A. Correct.
Overfitting occurs when a model learns the training data too well, including noise and details that do not generalize to new data. This explains why the decision tree performs well on the training set but poorly on the validation set.
- B. Incorrect.
If the features were not informative, all models, not just the decision tree, would likely perform poorly. However, the decision tree performs well on the training set, so this is unlikely.
- C. Incorrect.
While improper cross-validation could lead to misleading results, it would not specifically explain why only the decision tree exhibits poor validation performance.
- D. Incorrect.
Underfitting occurs when a model is too simple to capture the underlying patterns in the data. The decision tree's strong performance on the training set suggests it is not underfitting.