Addresses #559 by deprecating PatsyTransformer and introducing a FormulaicTransformer.
In writing of FormulaicTranformer I followed what is described in the formulaic documentation for integrating with sklearn. The main (tiny) differences with such implementation can be summarized as:
keeping the return_type parameter available (similar to what PatsyTransformer does)
avoiding parsing of parameters in __init__ method
how fit check is performed in .transform()
Additionally the PR makes both dependencies optional.
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[X] My code follows the style guidelines (flake8)
[X] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (also to the readme.md)
[X] I have added tests that prove my fix is effective or that my feature works
[X] I have added tests to check whether the new feature adheres to the sklearn convention
[X] New and existing unit tests pass locally with my changes
Description
Addresses #559 by deprecating
PatsyTransformer
and introducing aFormulaicTransformer
.In writing of
FormulaicTranformer
I followed what is described in the formulaic documentation for integrating with sklearn. The main (tiny) differences with such implementation can be summarized as:return_type
parameter available (similar to whatPatsyTransformer
does)__init__
method.transform()
Additionally the PR makes both dependencies optional.
Type of change
Checklist: