Skip to content

Allow FunctionTransformer to work with categorical variables when wrapped by SklearnTransformerWrapper#447

Merged
solegalli merged 2 commits intofeature-engine:mainfrom
nandevers:add-function-tests
May 9, 2022
Merged

Allow FunctionTransformer to work with categorical variables when wrapped by SklearnTransformerWrapper#447
solegalli merged 2 commits intofeature-engine:mainfrom
nandevers:add-function-tests

Conversation

@nandevers
Copy link
Contributor

@nandevers nandevers commented May 9, 2022

closes #416

This PR modifies:

feature_engine/feature_engine/wrappers/wrappers.py
feature_engine/tests/test_wrappers/test_sklearn_wrapper.py

Passed pytest tests/test_wrappers/test_sklearn_wrapper.py -k 'test_function_transformer_works_with_numericals' test successfully !

Passed pytest tests/test_wrappers/test_sklearn_wrapper.py -k 'test_function_transformer_works_with_numericals' test successfully !

@nandevers
Copy link
Contributor Author

@solegalli I believe this is tidier than PR #443. Please consider this one for review. Thanks a bunch.

@solegalli solegalli changed the title Added FunctionTransformer test and wrap refenrece Allow FunctionTransformer to work with categorical variables when wrapped by SklearnTransformerWrapper May 9, 2022
@solegalli solegalli merged commit 248465e into feature-engine:main May 9, 2022
@solegalli
Copy link
Collaborator

Thank you @nandevers, great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SklearnTransformerWrapper fails when FunctionTransformer used with non-numerical columns

2 participants