Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 7 mistake in Gradient Boosting with Early stopping #445

Closed
123385918 opened this issue Jun 6, 2019 · 1 comment

Comments

@123385918
Copy link

@123385918 123385918 commented Jun 6, 2019

in cell In[44] ,using GradientBoostingRegressor's method staged_predict()

bst_n_estimators = np.argmin(errors)

is not the best, because np.argmin() start from 0.
it should be

bst_n_estimators = np.argmin(errors)+1.

the result in cell In[47] can prove.

微信截图_20190606094818

@ageron

This comment has been minimized.

Copy link
Owner

@ageron ageron commented Jun 8, 2019

Good catch, thanks! :)
I'll fix this now.

@ageron ageron closed this in 8663460 Jun 8, 2019
lvnilesh added a commit to beacloudgenius/handson-ml that referenced this issue Sep 11, 2019
* 'master' of https://github.com/ageron/handson-ml: (30 commits)
  In Python 3, we can use os.makedirs(..., exist_ok=True)
  Update to nltk 3.4.5 (security patch)
  Small spelling improvements to the RNN chapter
  Use fc1_drop instead of fc1, fixes ageron#304
  Update Deepnote links
  Update README.md
  Update README.md
  bst_n_estimators should be argmin(errors) + 1, fixes ageron#445
  Docker image - install PyYAML 3.13 to avoid version conflict
  Add zip, joblib, xgboost, urlextract and most TF-related packages to Docker image
  Update docker image
  Add index=housing.index when wrapping array in a DataFrame, fixes ageron#426
  Crop long outputs to make it easier to visualize the notebooks on github.com
  Remove unused init and new_saver, fixes ageron#409
  Remove unused init node, fixes ageron#398
  Remove nbextensions from installation instructions, fixes ageron#401
  Add a comment about the use of pd.cut()
  Update libraries to latest versions
  add ml-project-checklist (Appendix B of the book)
  Upgrade scikit-image
  ...
lvnilesh added a commit to beacloudgenius/handson-ml that referenced this issue Sep 21, 2019
* 'master' of https://github.com/ageron/handson-ml: (31 commits)
  fixes docker build issue
  In Python 3, we can use os.makedirs(..., exist_ok=True)
  Update to nltk 3.4.5 (security patch)
  Small spelling improvements to the RNN chapter
  Use fc1_drop instead of fc1, fixes ageron#304
  Update Deepnote links
  Update README.md
  Update README.md
  bst_n_estimators should be argmin(errors) + 1, fixes ageron#445
  Docker image - install PyYAML 3.13 to avoid version conflict
  Add zip, joblib, xgboost, urlextract and most TF-related packages to Docker image
  Update docker image
  Add index=housing.index when wrapping array in a DataFrame, fixes ageron#426
  Crop long outputs to make it easier to visualize the notebooks on github.com
  Remove unused init and new_saver, fixes ageron#409
  Remove unused init node, fixes ageron#398
  Remove nbextensions from installation instructions, fixes ageron#401
  Add a comment about the use of pd.cut()
  Update libraries to latest versions
  add ml-project-checklist (Appendix B of the book)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.