Problem 2: Compare Train vs Test Error for an Overly Complex Model
Easypython
Problem Description
Write a Python program that trains a very deep Decision Tree (max_depth=20 or no limit) on the same dataset, and compares its training and test error, to observe signs of high variance.
Input
The same dataset split into training and test sets.
Output
Training and test MSE for the deep model.
Constraints
- Use the same dataset as Problem 1 for direct comparison.
Example Input
text(The same dataset as Problem 1)
Example Output
textTrain MSE: 0.002 Test MSE: 0.19
Concepts Covered
DecisionTreeRegressor, max_depth, overfitting diagnosis.