-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Get individual tree depths #2034
Comments
set |
Hi, what attribute of the Python model should I use to access the tree depths? To be clear, I already see it printed - that's not my question; I want to access the depths of each of the trees in the gbm model within my Python code. Is there a way to do that? |
@abhishek-ghose |
Got it, thanks! |
Hi,
I am using the Python version of LightGBM (not the sklearn API though). After I have run the
train()
function withboosting_type='gbdt'
, is there anyway to get the depths of individual trees? I have the prescribedmax_depth
s; I am interested in the actual depths.I see that this information is printed out per iteration:
[LightGBM] [Debug] Trained a tree with leaves = 31 and max_depth = 8
But I am unable to locate this information in the object
train()
returns (checked it in debug mode). Is this information stored only in the C backend? Any means to access it from Python?Thanks!
The text was updated successfully, but these errors were encountered: