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
434 stars 98 forks source link

Passing manual bins into BinningProcess #309

Closed rupakbanerjee77 closed 3 months ago

rupakbanerjee77 commented 3 months ago

Hello sir,

The optbinning library has been wonderful and I am using it to build scorecards in my bank. However, one challenge I am facing related to pass the manually created bins/splits into the BinningProcess. Is it possible to pass a certain bins which are not optimal but are required from the business point of view and needs to be included in the scorecard.

Please show with an example.

Regards, Rupak Banerjee

guillermo-navas-palencia commented 3 months ago

Hi @rupakbanerjee77.

The BinningProcess has the parameter binning_fit_params. In this tutorial, Cell 8, there is an example. In your case, you just need to pass a dictionary with keys user_splits and user_splits_fixed for each variable requiring manual splits.

rupakbanerjee77 commented 3 months ago

Thank you sir for your support, it worked.

Regards, Rupak Banerjee