ageron / ageron/handson-ml

Chapter 2: Overfitting

Open
#381 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
25.6k
Forks
12.7k
PR merge metrics
No merged PRs in 30d

Description

Dear Sir,

I was wondering how you could find such a good result with a RandomForest Regressor compared to my own results; i finally understood that you let the max_depth parameter to its default value which is None.
I remember an interview with coding project where i had let this parameter to None with along other values (small one liike [2,4,8] and the interviewer told me: "never train a RF with the parameter max_depth set to None, because all your result are meaningless since you overfit far too much".
So i was wondering how do you, in practice, try to avoid overfitting ? I personnally plot a validation Curve in order to vizualize the gap between the mean test and mean train score obtained from cross validation. If for one parameter the step/gap is "too hight" i overfit. But i have no idea of what should be the gap to say i overfit.

Thanks for your help

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.