guillermo-navas-palencia / optbinning

Optimal binning: monotonic binning with constraints. Support batch & stream optimal binning. Scorecard modelling and counterfactual explanations.
http://gnpalencia.org/optbinning/
Apache License 2.0
452 stars 100 forks source link

BinningProcess special_codes #259

Closed siempreasha closed 1 year ago

siempreasha commented 1 year ago

Maybe in BinningProcess special_codes is same for all variables for input data. But var A has special_codes like 'special_a': [0], 'special_b': [999999999], and var B has special_codes [-99, -999]. So Optbinning can handle those situation if we run the code each other. However, we want to use total data to calculate the result of binning.

guillermo-navas-palencia commented 1 year ago

Hi @siempreasha. Indeed, special_codes during instantiation of a BinningProcess applies these codes to all variables. To pass specific special codes use the parameter binning_fit_params. See example here: http://gnpalencia.org/optbinning/tutorials/tutorial_binning_process_FICO_xAI.html#Modeling