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

Add method to provide actual ntree value #8879

Closed
exalate-issue-sync bot opened this issue May 12, 2023 · 4 comments
Closed

Add method to provide actual ntree value #8879

exalate-issue-sync bot opened this issue May 12, 2023 · 4 comments

Comments

@exalate-issue-sync
Copy link

If early stopping is enabled, GBM can reset the ntree value. Let's add a new method to get the actual ntree value (whether CV is enabled or not), rather than the original ntree value a user set before building their model.

Currently if you want the actual ntree value you need to do:

Python:
model._model_json['output']['model_summary']['number_of_trees']

R:
my_model@model$model_summary['number_of_trees']

we could add a method like:

model.ntree_actual

@exalate-issue-sync
Copy link
Author

trushant.kalyanpur commented: #95894 (https://support.h2o.ai/a/tickets/95894) - Actual ntrees in gbm model

@exalate-issue-sync
Copy link
Author

Sebastien Poirier commented: actually, there are currently simpler access to those properties than what is mentioned in the description.
at least for Python:
{{model.summary()['number_of_trees']}}

@exalate-issue-sync
Copy link
Author

Zuzana Olajcová commented: resolved in [#4078|https://github.com//pull/4078]

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Migration Info

Jira Issue: PUBDEV-6754
Assignee: Zuzana Olajcová
Reporter: Lauren DiPerna
State: Resolved
Fix Version: 3.28.0.1
Attachments: N/A
Development PRs: Available

Linked PRs from JIRA

#4078
#4123
#4248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant