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
449 stars 99 forks source link

MDLP not working with iris dataset #125

Closed marcdhansen closed 3 years ago

marcdhansen commented 3 years ago

Hi, I modified the test_mdlp.py code in the repository to work with the iris dataset, but no splits are being created.

I'm attaching a copy of the modified test code with the .py extension changed to .txt so that it will upload: test_mdlp.txt

guillermo-navas-palencia commented 3 years ago

Hi @marcdhansen,

The MDLP algorithm only works with a binary target. The iris dataset has a multi-class target. You can use the MulticlassOptimalBinning class instead.

http://gnpalencia.org/optbinning/binning_multiclass.html http://gnpalencia.org/optbinning/tutorials/tutorial_multiclass.html