scikit-learn-contrib / category_encoders

A library of sklearn compatible categorical variable encoders
http://contrib.scikit-learn.org/category_encoders/
BSD 3-Clause "New" or "Revised" License
2.41k stars 396 forks source link

fix: Broken inverse_transform for OrdinalEncoder when custom mapping … #383

Closed fredmontet closed 1 year ago

fredmontet commented 2 years ago

This PR fixes issue #202. It then allows for inverse transform to be performed with custom dict.

Proposed Changes

The changes are minor and modify line 171 by implementing comment https://github.com/scikit-learn-contrib/category_encoders/issues/202#issuecomment-946159286

PaulWestenthanner commented 2 years ago

Hi @fredmontet Thanks for your contribution, unfortunately your change introduces some tests failures. Could you please look into them and fix them?

PaulWestenthanner commented 2 years ago

I think you don't need the parentheses when calling .values

PaulWestenthanner commented 1 year ago

closing this as #222 fixes it