Decision Tree Regression: Avoiding Overfitting in Training Data

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
falyusuf
Messages
35
Reaction score
3
Homework Statement
Remove the overfitting in the following example.
Relevant Equations
-
The decision tree in the following curve is too fine details of the training data and learn from the noise, (overfitting).
overfitting.png

Ref: https://scikit-learn.org/stable/aut...lr-auto-examples-tree-plot-tree-regression-py

I tried to remove the overfitting but not sure about the result, can someone confirm my answer? Here's what I got:
result.png
 
Physics news on Phys.org
From your graph, it appears that you trained to 5 outliers at max=5, vs the 7 outliers in the original graph. What parameter did you adjust?