Closed pimlock closed 1 year ago
Fixes https://github.com/scikit-learn-contrib/category_encoders/issues/392
Adds re.escape() when matching columns from the dataset, when doing inverse_transform in BaseNEncoder.
re.escape()
inverse_transform
BaseNEncoder
Without this re.escape(), any regex metacharacter is being interpreted by the regex engine, which leads to invalid results or exception being thrown.
nicely spotted, thanks for this contribution!
Fixes https://github.com/scikit-learn-contrib/category_encoders/issues/392
Proposed Changes
Adds
re.escape()
when matching columns from the dataset, when doinginverse_transform
inBaseNEncoder
.Without this
re.escape()
, any regex metacharacter is being interpreted by the regex engine, which leads to invalid results or exception being thrown.