matthewwardrop / formulaic

A high-performance implementation of Wilkinson formulas for Python.
MIT License
346 stars 25 forks source link

Add support for the patsy `Q` transform. #117

Closed matthewwardrop closed 1 year ago

matthewwardrop commented 2 years ago

Motivated by #115 , this is a quick draft demonstrating a Q transform that replicates the behavior of the patsy Q function.

Notes:

Closes: #115

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a7ecebd) 100.00% compared to head (3449e72) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #117 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 48 48 Lines 2530 2560 +30 ========================================= + Hits 2530 2560 +30 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/matthewwardrop/formulaic/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop) | Coverage Δ | | |---|---|---| | [formulaic/materializers/base.py](https://codecov.io/gh/matthewwardrop/formulaic/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop#diff-Zm9ybXVsYWljL21hdGVyaWFsaXplcnMvYmFzZS5weQ==) | `100.00% <ø> (ø)` | | | [formulaic/transforms/patsy\_compat.py](https://codecov.io/gh/matthewwardrop/formulaic/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop#diff-Zm9ybXVsYWljL3RyYW5zZm9ybXMvcGF0c3lfY29tcGF0LnB5) | `100.00% <100.00%> (ø)` | | | [formulaic/utils/layered\_mapping.py](https://codecov.io/gh/matthewwardrop/formulaic/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop#diff-Zm9ybXVsYWljL3V0aWxzL2xheWVyZWRfbWFwcGluZy5weQ==) | `100.00% <100.00%> (ø)` | | | [formulaic/utils/stateful\_transforms.py](https://codecov.io/gh/matthewwardrop/formulaic/pull/117?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop#diff-Zm9ybXVsYWljL3V0aWxzL3N0YXRlZnVsX3RyYW5zZm9ybXMucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthew+Wardrop)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.