youbao88 / KPrototypes_plus

A JIT optimized K-Prototype algorithm
MIT License
2 stars 0 forks source link

Categorical variables as strings #2

Open ori-katz100 opened 2 years ago

ori-katz100 commented 2 years ago

It seems that the functions only work for categorical variables coded as ints. I had to do something like this before running the code: for f in cat_features: data[f] = data[f].astype('category') data[cat_features] = data[cat_features].apply(lambda x: x.cat.codes) I think that you should include it in the functions, and translate the results back to categories.

youbao88 commented 2 years ago

Hi Thank you for your contribution. I will fix that in the next release.

youbao88 commented 2 years ago

A new fix has been released, please verify if this issue is still there or not. #3