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

Shapely values on Scorecard object #274

Closed hermanashley closed 7 months ago

hermanashley commented 8 months ago

Hi there!

Our team is interested in checking out the Shapely values associated with our Scorecard model developed using optbinning. I'm wondering if there is an out-of-the-box way to do this, or if this functionality could be added eventually.

Sr far, I've tried the SHAP module. However this is designed to work with sklearn, so when I tried to load our model into an explainer from their library it doesn't recognize what type of model I am giving it. Error is

An unknown model type was passed: <class 'optbinning.scorecard.scorecard.Scorecard'>

Any help is appreciated. Thanks!

guillermo-navas-palencia commented 8 months ago

Hi. A workaround is using the fitted logistic regression and the transformed WOE matrix. Some OptBinning users are already doing it.

nitinjethwani7 commented 8 months ago

Hi. A workaround is using the fitted logistic regression and the transformed WOE matrix. Some OptBinning users are already doing it.

Can you guide us to any relatable notebook or reproduce results for our convenience?

guillermo-navas-palencia commented 7 months ago

Hi. A workaround is using the fitted logistic regression and the transformed WOE matrix. Some OptBinning users are already doing it.

Can you guide us to any relatable notebook or reproduce results for our convenience?

Sorry, I don't have time for that.

guillermo-navas-palencia commented 6 months ago

This paper might be relevant: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4637305