Skip to content

Cannot access leaf nodes of trained trees #2084

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

Closed
daholste opened this issue Jan 9, 2019 · 4 comments
Closed

Cannot access leaf nodes of trained trees #2084

daholste opened this issue Jan 9, 2019 · 4 comments
Labels
API Issues pertaining the friendly API

Comments

@daholste
Copy link
Contributor

daholste commented Jan 9, 2019

Issue

  • What did you do?
    In FastTreeTrainerBase, I see that 'TrainedEnsemble' is not a public attribute.

  • What did you expect?
    It would be awesome and useful for us if we could access the trained trees here. Thanks!

@daholste
Copy link
Contributor Author

ah, I realized I can get leaf values thru the publicly exposed 'GetLeaf' method on the fitted model. My bad!

@daholste
Copy link
Contributor Author

ah, TrainedEnsemble may need to be public for the following reason:
even though I can get the leaf value given a tree id, it may not be possible to get the # trained trees in the ensemble, without access to 'TrainedEnsemble'? (please lmk if this is possible, but I am overlooking it -- this may definitely be the case)
Ie, in a RandomForest run, I asked that 10 trees be created, but in the trained model, only 9 were created. When I went to check the leaf node of the last tree thru the GetLeaf method, I get an ArgumentOutOfRange exception, because the last tree did not exist

@daholste daholste reopened this Jan 11, 2019
@Ivanidzo4ka Ivanidzo4ka added the API Issues pertaining the friendly API label Jan 29, 2019
@Ivanidzo4ka
Copy link
Contributor

Related to #1960

@Ivanidzo4ka
Copy link
Contributor

Duplicate of #1960

@Ivanidzo4ka Ivanidzo4ka marked this as a duplicate of #1960 Jan 29, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Issues pertaining the friendly API
Projects
None yet
Development

No branches or pull requests

2 participants