Skip to content

Expose number of bins used by the model while binning continuous features to C API #3406

@narendramukherjee

Description

@narendramukherjee

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!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions