-
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
Expose number of bins used by the model while binning continuous features to C API #3406
Comments
sorry, this api is not exposed. Exposing it is relatively easy, contribution is very welcome! |
Thanks @guolinke - can you give me some pointers on how to go about exposing this part of the api? I can then make an appropriate PR |
you can add the related function in c_api.h and c_api.cpp. Lines 1486 to 1492 in ceb6265
|
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
Reopening since I'm working on this. |
This issue has been automatically locked since there has not been any recent activity since it was closed. |
Hi,
I am using the sklearn api to lightgbm, and am wondering if there's a way I can get the number of bins (defined to be < max_bin) that the model creates while binning continuous features? I found the cpp code that counts up the bins (in
num_bin_
) here: https://github.com/Microsoft/LightGBM/blob/7a89d0054bcf0db9f96af3c53a078b6aa3152efe/src/io/bin.cpp#L207-L401 , going from #2063 , but is there a way to get this number from a trained model for each feature it binned?Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: