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

Optbinning misses "missings" in binning #250

Closed loveis98 closed 1 year ago

loveis98 commented 1 year ago

Hi! I use optbinning==0.17.3 The problem is incorrect counting of missings while binning process: image But the real number of missing values is: image

Could you fix it?

guillermo-navas-palencia commented 1 year ago

Hi @loveis98. Could you please provide data to reproduce the result? I think this is due to the sample_weights you are passing, and the counts are computed using considering the weights, which is correct.

loveis98 commented 1 year ago

Hi @loveis98. Could you please provide data to reproduce the result? I think this is due to the sample_weights you are passing, and the counts are computed using considering the weights, which is correct.

Yes, I've checked without sample_weight parameter, and it's correct result now. But it was not obviously:(