You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently having issues determining which trees correspond to which class from the output of LGBMClassifier.booster_.dump_model().
Take a simple scenario of LGBMClassifier has n_classes_=3 and n_estimators_=2. From my understanding of GBDTs and RFs in LightGBM, for each class label n_estimators_ are constructed. This is supported by the output of raw = LGBMClassifier.booster_.dump_model(), where raw["tree_info"] is a list containing 2*3 decision trees.
My question is:
How do I know which set of n_estimators_ decision trees correspond to a given class?
In the output of raw = LGBMClassifier.booster_.dump_model() I can find no information on which class from the set {0, 1, 2} raw["tree_info"][i] corresponds to for i in {0,...,5}. So let the classes be {0, 1, 2}. Are the 6 trees assumed to be ordered in any of the following ways?: [0, 1, 2, 0, 1, 2] or [0, 0, 1, 1, 2, 2]. If not, where would I find this information? (I have looked into the reader and believe it is doing the first option [0, 1, 2, 0, 1, 2] , but would like some confirmation. I would also assume this information should be somewhere in the output of dump_model, but I cannot find anything).
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.
I am currently having issues determining which trees correspond to which class from the output of
LGBMClassifier.booster_.dump_model()
.Take a simple scenario of
LGBMClassifier
hasn_classes_=3
andn_estimators_=2
. From my understanding of GBDTs and RFs in LightGBM, for each class labeln_estimators_
are constructed. This is supported by the output ofraw = LGBMClassifier.booster_.dump_model()
, whereraw["tree_info"]
is a list containing 2*3 decision trees.My question is:
How do I know which set of
n_estimators_
decision trees correspond to a given class?In the output of
raw = LGBMClassifier.booster_.dump_model()
I can find no information on which class from the set {0, 1, 2}raw["tree_info"][i]
corresponds to for i in {0,...,5}. So let the classes be {0, 1, 2}. Are the 6 trees assumed to be ordered in any of the following ways?: [0, 1, 2, 0, 1, 2] or [0, 0, 1, 1, 2, 2]. If not, where would I find this information? (I have looked into the reader and believe it is doing the first option [0, 1, 2, 0, 1, 2] , but would like some confirmation. I would also assume this information should be somewhere in the output ofdump_model
, but I cannot find anything).The text was updated successfully, but these errors were encountered: