Skip to content

Suggest adding float ranges in binning_table.build result #349

@chengs

Description

@chengs

In such code

optb = OptimalBinning(name='example', dtype='numerical', solver='cp')
optb.fit(X, y)
binning_table = optb.binning_table
bins = binning_table.build()
print(bins)

binning_table.build method returns a pandas.DataFrame as follows:

Image

This dataframe actually can be used more than display, with other format, such as JSON.
For example, with this table, one can build a transform function converting values into WoE, in other language/platform (C, tensorflow, java etc)

Therefore, I would suggest that, the range of each bin can be saved in their raw float values, and then this build api can be modified to accept a format property (or add a new build_json api).

If this is reasonable to you, I am happy to make a PR.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions