Closed FGlazov closed 2 years ago
Thanks for reporting, @FGlazov . This is fixed by https://github.com/nicodv/kmodes/pull/176
Until that's released, please use fit
and predict
sequentially.
New release with this fix: https://github.com/nicodv/kmodes/releases/tag/0.12.1
Expected Behavior
It should be possible to pass a
sample_weight
tofit_predict
inKPrototypes
, and to get the cluster labels from the weighted fitting.Actual Behavior
Passing a sample_weight to fit_predict causes an exception. This is because the predict function in
KProtoypes
does not have a**kwargs
, nor does it take asample_weight
.Steps to Reproduce the Problem
Pass a
sample_weight
tofit_predict
ofKPrototypes
, along with some data.Specifications