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
459 stars 100 forks source link

Can optbinning really work with multi-class classification? and build scorecard model using Scorecard() function? #312

Closed juyjuyy closed 7 months ago

juyjuyy commented 7 months ago

image I used BinningProcess function for the multiclass binning process, the Logistic Regression model from sklearn to be an estimator, and scorecard function to show the point corresponding to each value of variables. So I have two questions here:

  1. What are the differences between BinningProcess and MulticlassOptimalBinning while both of them can be used to solve multiclass problems?
  2. Can Optbinning execute making points in the scorecard process? If have, can you show me how to use that? If not, please can you suggest other solutions with multiclass classification, because then I want to convert the coefficient of the model into points in the scorecard?
guillermo-navas-palencia commented 7 months ago

Hi @juyjuyy

  1. BinningProcess calls internally MulticlassOptimalBinning if a multiclass target is provided.
  2. The Scorecard class does not support a multiclass target. I honestly don't know how to convert weighted WoE to proper scores.

Only binary and continuous targets are supported. http://gnpalencia.org/optbinning/scorecard.html